View All
Python Facts
Multiple return values
Python allows expanding return values from a tuple to several variables:
def get_center(): return (10, 10) x, y = get_center() print "The center is at X: %d, Y: %d" % (x, y)
Add
your own, or share this snippet:
Tweet
Give me another one!