What's up with this code?

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Wed Feb 22 19:17:29 EST 2006


Gregory Petrosyan:
> coefs.extend(it.chain(rcoefs1, rcoefs2)) #? -- here is magic

Can't you just do a couple of extend? Something like:

coefs.extend(rcoefs1)
coefs.extend(rcoefs2)

This looks simpler and probably faster too.

Bye,
bearophile




More information about the Python-list mailing list