2016-01-19 39 views

回答

5

您可以把元組,就像任何其他對象,

>>> print tup_1, tup_2 
('hello', 'world') (1, 2, 3) 
>>> tup_1, tup_2 = tup_2, tup_1 
>>> print tup_1, tup_2 
(1, 2, 3) ('hello', 'world') 
相關問題