1 l = [1,2,3,4,5,6,7,8,9,0] 2 a,*b,c = l 3 print(a,b,c) 4 输出: 5 1 [2, 3, 4, 5, 6, 7, 8, 9] 0
1 a = '你好' 2 b = "你是谁" 3 a,b = b,a 4 print(a,b) 5 输出: 6 你是谁 你好
1 l = [1,2,3,4,5,6,7,8,9,0] 2 a,*b,c = l 3 print(a,b,c) 4 输出: 5 1 [2, 3, 4, 5, 6, 7, 8, 9] 0
1 a = '你好' 2 b = "你是谁" 3 a,b = b,a 4 print(a,b) 5 输出: 6 你是谁 你好