元组的创建

a = (1, 2, 3)

b = [1, 2, 3],

c = 1,

print(a, type(a))

print(b, type(b))

print(c, type(c))

 

(1, 2, 3) <class 'tuple'>
([1, 2, 3],) <class 'tuple'>
(1,) <class 'tuple'>

posted @ 2020-08-11 20:39  KK-KING  阅读(289)  评论(0编辑  收藏  举报