splitting strings in python without split 28 29

Solutions on MaxInterview for splitting strings in python without split 28 29 by the best coders in the world

showing results for - "splitting strings in python without split 28 29"
Elías
22 Jul 2020
1sentence = 'This is a sentence'
2word=""
3for w in sentence :
4    if w.isalpha():
5        word=word+w
6
7    elif not w.isalpha():
8      print(word)
9      word=""
10print(word)
11