Answers for "seeparate string without split function python"

0

seeparate string without split function python

new_list = []
for sentence in old_list:
    word = ''
    for ch in sentence:
        if ch == ' ' and word != '':
            new_list.append(word)
            word = ''
        else:
            word += ch
    if word != '':
        new_list.append(word)
Posted by: Guest on October-12-2021

Code answers related to "seeparate string without split function python"

Python Answers by Framework

Browse Popular Code Answers by Language