Using Python 2.7.3.1
I don't understand what the problem is with my coding! I get this error: AttributeError: 'list' object has no attribute 'split
This is my code:
myList = ['hello']myList.split()
Using Python 2.7.3.1
I don't understand what the problem is with my coding! I get this error: AttributeError: 'list' object has no attribute 'split
This is my code:
myList = ['hello']myList.split()
You can simply do list(myList[0])
as below:
>>> myList = ['hello']
>>> myList=list(myList[0])
>>> myList
['h', 'e', 'l', 'l', 'o']
See documentation here