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