Skip to content
当前页

python数据类型

列表

list1 = ['physics', 'chemistry', 1997, 2000]

类似js的数组

元组

data = (1, 2)

以小括号包裹,内部不能修改,类似数组,可以用下标访问或者截取获得新元组