textarea to list
Question:
textarea returns this
[u'arnbrncrndrne']
what is the best way to turn that into a list
[‘a’, ‘b’, ‘c’, ‘d’, ‘e’]
Thanks!
Answers:
>>> L = [u'arnbrncrndrne']
>>> L[0].split('rn')
[u'a', u'b', u'c', u'd', u'e']
txtarea = "Thank you for the musicnWelcome to the jungle"
x = txt.splitlines()
print(x)
textarea returns this
[u'arnbrncrndrne']
what is the best way to turn that into a list
[‘a’, ‘b’, ‘c’, ‘d’, ‘e’]
Thanks!
>>> L = [u'arnbrncrndrne']
>>> L[0].split('rn')
[u'a', u'b', u'c', u'd', u'e']
txtarea = "Thank you for the musicnWelcome to the jungle"
x = txt.splitlines()
print(x)