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 count number of true?

Leave a Reply

Your email address will not be published. Required fields are marked *

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