split and strip elements in list python

Viewed 7265

words is a list which look something like this:

        ['34 ', '111110 ', '0 ', '@jjuueellzz down ']
        ['67 ', '111112 ', '1 ', 'Musical awareness ']
        ['78 ', '111114 ', '1 ', 'On Radio786 ']
        ['09 ', '111116 ', '0 ', 'Kapan sih lo ']

If you notice there is a space at the end after every element in the list, I know I should strip but do not know how would I do that.

Here is my code:

words = line.split('\t')

If I do words = line.strip().split('\t') - it does not strip properly like I want

2 Answers
Related