lax_coordinates = (33.9425, -118.408056) latitude, longitude = lax_coordinates # tuple unpacking
variable = (10,20) # a = 10, b = 20 b,a = variable print ("a = %d, b = %d" % (a,b))
使用Tuple可以方便的交换两个数的位置,不用设临时变量。