Skip to content

How to split a string into a list of characters in Python?

sentence = 'Hello world a b c'
split_sentence = sentence.split(' ')
print(split_sentence)
See also  Python code snippet - How to make multiple box plots?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.