Przegląd sekcji

    • def toster_word_split(s, SEPARATORS=' \n\r\t.;,?!\t'):

          result=[]

          current_word=''

          for char in s:

              if char in SEPARATORS:

                  if current_word:

                      result.append(current_word)

                      current_word=''

              else:

                  current_word+=char

         

          if current_word:

              result.append(current_word)

          return result