Jul 02, 2008 12:52
It's generally know that you can do this in python:
a = (1,2)
b, c = a
print 'b: ', b
print 'c: ', c
b: 1
c: 2
But I find this icky for some reason:
a = ((1,2), 3)
(b, c), d = a
print 'b: ', b
print 'c: ', c
print 'd: ', d
b: 1
c: 2
d: 3
I know it isn't really that funky, but I just have higher expectations when it comes to Python syntax.
Leave a comment
Comments 1
Reply
Leave a comment