x=(100) print(x,type(x)) y=(100,) print(y,type(y)) z=10,20,30 print(z,type(z)) a,b,c=z print('c=',c) b,c=c,b print('c=',c) tuple1='男',10,20,30,'女','gender' e,*f,g=tuple1 print(f'e={e},f={f},g={g}')
E:\python\python.exe "E:/python代码/The first python file.py"
100 <class 'int'>
(100,) <class 'tuple'>
(10, 20, 30) <class 'tuple'>
c= 30
c= 20
e=男,f=[10, 20, 30, '女'],g=gender
Process finished with exit code 0