deque.py
deque.py copied to clipboard
Split words using any whitespaces
Until now, words had to be separated by spaces only. Now, tabs (or any whitespaces work too). In addition, the code is a little bit cleaner because when using str.split() without any arguments, any empty strings are removed, thus rendering the len(word) > 0 condition unecessary.