I\'ve made a list of lists from a text block where each list contains all the words in a line as a separate element, like this:
listoflists = [[\'Lorem\', \'ipsu
Also, the reason your original code does not work is b/c n.strip('\n') does not change the value of n. It returns a new string. If you did something like n=n.strip('\n'); return n, that would work.
n.strip('\n')
n
n=n.strip('\n'); return n