I want to turn the string:
avengers,ironman,spiderman,hulk
into the list:
['avengers','ironman','spiderman','hulk']
I tried
list = raw_input("Enter string:")
list = list.split()
but it's not working the right way as I need it, it's taking the whole string and makes it as one item in the list (it works fine without the "," but that's not what I need)
list.split(','). But don't uselistas a variable name; you're overriding a (very useful) built-in function (calledlist).