str1 = "1 3 5 7 9" list1 = str1.split() map_object = map(int, list1)//Here we can turn the string into an int list listofint = list(map_object) print(listofint) #result is [1, 3, 5, 7, 9]