a=[1,2,3,4,5,6,7]
b=["ab","cd","ef","gh","ij"]
c=[1.1,2.1,3.1,4.1,5.1,6.1,7.1]
d=[1.1,2.1,3.1,4.1,5.1,6.1,7.1]
e=["ab","cd","ef","gh","ij"]
print(a)#打印所有元素
print(b[0])#打印部分元素
print(a[-1])#打印倒数第一个元素


#添加元素
a.append(8)
print(a)
print(a.append(7))
#插入元素
b.insert(2,"yy")
print(b)
#删除元素
del c[0]
print(c)
#弹出元素
d.pop(1)
print(d)
#根据值修改元素
e.remove("ij")
print(e)


f=[7,2,3,4,6,5,1]
g=[7,2,3,4,6,5,1]
h=["ab","cd","ef","gh","ij"]
#倒着打印
h.reverse()
print(h)
#临时排序,相当于仅打印时排序
print(sorted(f))
#正向排序
#f.sort()
print(f)
#确认列表长度
print(len(h))
