例2.3 列表操作示例

例2.3 列表操作示例


L=['abc',12,3.45,'Python',2.789]
print(L)
print(L[0])
L[0]='a'
L[1:3]=['b','Hello']
print(L)
L[2:4]=[]
print(L)

print("学号:3004")

posted on 2024-09-06 12:01  黄元元  阅读(26)  评论(0)    收藏  举报