Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Splitting strings in Python without split()

sentence = 'This is a sentence'
word=""
for w in sentence :
    if w.isalpha():
        word=word+w

    elif not w.isalpha():
      print(word)
      word=""
print(word)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Splitting #strings #Python
ADD COMMENT
Topic
Name
9+5 =