增加:
names = ['li','wang','monkey'] list =["wang","cui"]
names.append("puma")
names.insert(1,"wan")
names.extend(list)
删:
del names[1:]
names.pop()
names.remove("wang")
改:
names[1] = "hello"
查:
"li" in names
字符串的构造 可以通过 “+” 连接
也可以 :
f = "====%s===="%"str"
f = '====str===='
网友评论