how to iterate all sub-element in a list

seaspeak at gmail.com seaspeak at gmail.com
Fri Jan 31 05:42:45 EST 2014


Skip Montanaro於 2014年1月31日星期五UTC+8下午6時29分27秒寫道:
> Google for "python flatten list."
> 
> 
> 
> This question comes up frequently, though I'm not sure if that's
> 
> because it's a common homework problem or because people are unaware
> 
> of the += operator (or extend method) for lists, and so build
> 
> lists-of-lists when they could just build them flat in the first
> 
> place.
> 
> 
> 
> Skip
thanks. a keyword is all I need.
It is not homework. It is a common problem I guess.




More information about the Python-list mailing list