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 145 views
1 answer 150 views
1 answer 158 views
1 answer 163 views
...