- 多重赋值:
1 a, b = 1, 2 //a=1,b=2 2 a=b='bj' //a='bj',b='bj' 3 a,*b="beijing " //a='b', b=['e', 'i', 'j', 'i', 'n', 'g', ' '] 4 a,b=(1,2) //a=1,b=2 5 a,b=[1,2] //a=1,b=2 6 a+=1 //a=a+1
- 输入输出:
1 a, b = 1, 2 //a=1,b=2 2 a=b='bj' //a='bj',b='bj' 3 a,*b="beijing " //a='b', b=['e', 'i', 'j', 'i', 'n', 'g', ' '] 4 a,b=(1,2) //a=1,b=2 5 a,b=[1,2] //a=1,b=2 6 a+=1 //a=a+1