But not strip a list?

so you can join a list but not strip a list?

Does a list object have a strip attribute?

Consider,

>>> a = [''] * 10
>>> a
['', '', '', '', '', '', '', '', '', '']
>>> hasattr(a, 'strip')
False
>>> b =' '.join(a)
>>> len(b)
9
>>> hasattr(b, 'strip')
True
>>> c = b.strip()
>>> len(c)
0
>>> 
1 Like