Разделите строку на массив слов в Python
string = '1-2-3
array_of_words = string.split('-')
print(array_of_words) # prints ['1', '2', '3']
##################################################
#if you dont pass anything in the split() function,
#the default parameter will be a space
##################################################
string = '1 2 3'
array_of_words = string.split()
print(array_of_words) # prints ['1', '2', '3']
Cruel Chamois