在python中元组是不可修改的,用括号来定义它,下面语句有误的是()
2023-12-01人工智能
在python中元组是不可修改的,用括号来定义它,下面语句有误的是()
A.tup1 = ('physics'. 'chemistry', 1997, 2000) print(tup1[0])
B.tup1 = ('physics'. 'chemistry', 1997, 2000) tup2=(1,2)
C.tup1 = ('physics'. 'chemistry', 1997, 2000) tup2 = ('abc', 'xyz')
D.tup1 = ('physics'. 'chemistry', 1997, 2000) tup1[1]=0
正确答案是D
