set('for a of the and to in'.split(' ')) code example Example: how to split a string in python sample_str = "Help developers by donating!" txt.split(' ')