【python】元组的插入

>>> temp=(1,2,3,4,5)
>>> temp=temp[:2]+(8,)+temp[2:]
>>> temp
(1, 2, 8, 3, 4, 5)

posted @ 2016-10-31 17:25  GiraffaMPRO  阅读(1511)  评论(0编辑  收藏  举报