>>> tup
('aaa', 'bbb', 222, 333, 'eee')
>>> tup2 = ( 11, 222, 333, 'dddd', "eeeee" )
>>> tup
('aaa', 'bbb', 222, 333, 'eee')
>>> tup2
(11, 222, 333, 'dddd', 'eeeee')
>>> tup3 = tup + tup2
>>> tup3
('aaa', 'bbb', 222, 333, 'eee', 11, 222, 333, 'dddd', 'eeeee')
>>> tup3[2:5]
(222, 333, 'eee')
>>> tup3 = tup + tup * 3
>>> tup3
('aaa', 'bbb', 222, 333, 'eee', 'aaa', 'bbb', 222, 333, 'eee', 'aaa', 'bbb', 222, 333, 'eee', 'aaa', 'bbb', 222, 333, 'eee')
>>> len(tup3)
20
>>> del tup3
>>>
沒有留言:
張貼留言