Remove empty strings from list

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Wed Sep 16 04:08:22 EDT 2009


Sion Arrowsmith a écrit :
> Bruno Desthuilliers  <bruno.42.desthuilliers at websiteburo.invalid> wrote:
>>>> mylist = line.strip().split()
>> will already do the RightThing(tm).
> 
> So will
> 
> mylist = line.split()
> 
Yeps, it's at least the second time someone reminds me that the call to 
str.strip is just useless here... Pity my poor old neuron :(




More information about the Python-list mailing list