add a string to a list python code example
Example 1: python convert string to list
fruit = 'apple oranges banans'
newlist = fruit.split()
print(newlist)
Example 2: python add a string to a list
list = ["other str", 2, 56]
list.append("string")
# list = ["other str", 2, 56, "string"]