Python教程-元组

原创
2016/12/06 15:23
阅读数 83

1、

aTuple = (123, ‘abc’,4.56,[‘inner’,’tuple’])
bTuple = (None, ‘something to see here’)

2、

t=([‘xyz’,123], 23, -103.4)
t=t*2
t= t+(‘free’,’easy’)

3、成员关系操作、切片操作

in
[]
[:]

4、单元素元组

(‘xyz’)
(‘xyz’,)

 

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏
0
分享
返回顶部
顶部