Reputation: 29
i have python list,
l=['wright_2035566_qwerty , wright_2035566_qwerty,wright_2035566_qwerty']
but i needed this list into that format in python required list
new_list=['wright_2035566_qwerty', 'wright_2035566_qwerty', 'wright_2035566_qwerty']
please help me
Upvotes: 0
Views: 49
Reputation: 2085
I hope this works for you:
new_list = [x.strip() for x in l[0].split(',')]
Upvotes: 1