S = input("Bвeдитe строку:\n")
print(s[0:s.find(":")+1])
s = s[s.find(":")+1:len(s)]
while s.find(", ")>0:
print(" - "+s[0:s.find(", ")])
s = s[s.find(", ")+1:len(s)]
print(" - "+s)
Пример:
Bвeдитe строку:English words: apple, ball, cat, dog
English words:
- apple
- ball
- cat
- dog