Unpaking Tuple
sajuptpm
sajuptpm at gmail.com
Sat Oct 6 06:09:30 EDT 2012
More information about the Python-list mailing list
Sat Oct 6 06:09:30 EDT 2012
- Previous message (by thread): try/except KeyError vs "if name in ..."
- Next message (by thread): Unpaking Tuple
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I am using python 2.6. I need a way to make following code working without any ValueError . >>> a, b, c, d = (1,2,3,4) >>> a, b, c, d = (1,2,3). Note: Number of values in the tuple will change dynamically. I know in python 3, you can do `a, b, c, *d = (1, 2, 3)` and then d will contain any elements that didn't fit into a,b,c. Regards, Saju
- Previous message (by thread): try/except KeyError vs "if name in ..."
- Next message (by thread): Unpaking Tuple
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list