Newbie getting confused again

It's me itsme at yahoo.com
Fri Mar 4 20:42:35 EST 2005


If I have:

    a = (1,2,3)

how do I ended up with:

    res=[(1), (2), (3), (4), (5)]

without doing:

    res=[(a[0]), (a[1]), (a[2]), (4), (5)]

???

ps: This is just a nobrainer example of what my real code is trying to do.
"a" might have many many elements.   That's why the explicit indexing method
won't work.

Thanks,








More information about the Python-list mailing list