Interleaving in python