How to convert a string characters separated with space into a list in Python

1 Answer

0 votes
s = "a b c d e f"

lst = list(map(str, s.split())) 

print(lst)



'''
run:

['a', 'b', 'c', 'd', 'e', 'f']

'''

 



answered Apr 10, 2019 by avibootz

Related questions

1 answer 161 views
1 answer 167 views
1 answer 184 views
1 answer 179 views
...