python之列表学习

movies = ["A", "B", "C"]
print(movies[2])
print("%d" %len(movies))
movies.append("nihao")
print(movies)
movies.pop()
print(movies)
movies.extend(["www", "yyy"])
print(movies)
movies.remove("www")
print(movies)
movies.remove("yyy")
print(movies)
movies.insert(0, "zzz")
print(movies)

 

posted @ 2021-01-18 20:07  唯一诺  阅读(67)  评论(0编辑  收藏  举报