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!

Asked By: Zeynel

||

Answers:

>>> L = [u'arnbrncrndrne']
>>> L[0].split('rn')
[u'a', u'b', u'c', u'd', u'e']
Answered By: mechanical_meat
txtarea = "Thank you for the musicnWelcome to the jungle"
x = txt.splitlines()
print(x)
Answered By: Xiaobing Mi
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.