1.list1[0]与list1[0:1]的区别
2.分片的步长
3关于列表的copy(注意list2与list3的区别)
list1 = [,,,,,,]
list2 = list1[:]
list3 = list1
print(list1)
print(list2)
print(list3)
list1.sort()
print(list1)
print(list2)
print(list3)
1.list1[0]与list1[0:1]的区别
2.分片的步长
3关于列表的copy(注意list2与list3的区别)
list1 = [,,,,,,]
list2 = list1[:]
list3 = list1
print(list1)
print(list2)
print(list3)
list1.sort()
print(list1)
print(list2)
print(list3)