合并: +
(1)字符串的合并:strA = "hello" strB = "world"
print(strA+strB)
(2)列表的合并: listA = list(range(10)) listB = list(range(11,21)) print(listA+listB)
复制:*
(1)print(strA*3) # 输出3次hello
(2)print(listA) # 输出3次0——9
判断是否存在:in
(1)print("h" in strA) #判断h在字符串A中是否存在,返回值为布尔类型。` # true
(2)print("PP" in listA) #false
(3)dictA = {"name":"lucy"} print("name" in dictA) # true