So stdin returns a string of text into a list, and multiple lines of text are all list elements. How do you split them all into single words?
mylist = [\'thi
Alternatively, you can map str.split method to every string inside the list and then chain the elements from the resulting lists together by itertools.chain.from_iterable:
from itertools import chain
mylist = ['this is a string of text \n', 'this is a different string of text \n', 'and for good measure here is another one \n']
result = list(chain.from_iterable(map(str.split, mylist)))
print(result)
# ['this', 'is', 'a', 'string', 'of', 'text', 'this', 'is', 'a', 'different', 'string', 'of', 'text', 'and', 'for', 'good', 'measure', 'here', 'is', 'another', 'one']