ramsess90

zad 2 Word splite mini

Jan 25th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. txt = input()
  2. replacements = ",;:.!()\"\'\\/[] "
  3. clear_chars = []
  4. for i in range(0, len(txt)):
  5.         if txt[i] in replacements:
  6.             clear_chars.append(' ')
  7.         else:
  8.             clear_chars.append(txt[i])
  9. words_str = ''.join(clear_chars)
Advertisement
Add Comment
Please, Sign In to add comment