sum and strings

Gerhard Fiedler gelists at gmail.com
Sun Aug 20 08:49:03 EDT 2006


On 2006-08-20 07:18:44, Rhamphoryncus wrote:

>> shallow = []
>> [shallow.extend(i) for i in deep]
> 
> I'm sure this has been mentioned before, but listcomps are for when you
> want to store the list and use it for further things, not for when you
> want a side effect.  TOOWTDI.

Can you please explain what you mean with this, and maybe why?

Thanks,
Gerhard




More information about the Python-list mailing list