list_date = [1, 2, 3]
print("list_date=", list_date, ";", "type=", type(list))
list_date.append(4)
print("list_date=", list_date)
list_date.insert(3, 7)
print("list_date=", list_date)
list_date2 = [11, 12, 13]
list_date.extend(list_date2)
print("list_date=", list_date)
pop_element = list_date.pop(3)
print("pop_element=", pop_element, ";", "list_date=", list_date)
list_date.reverse()
print("list_date=", list_date)
list_date.sort()
print("list_date=", list_date)
dir_date = {"zhangsan": 18, "lisi": 20}
print("dir_date=", dir_date, ";", "type=", type(dir_date))
dir_date.update({"wangwu": 31})
print("dir_date=", dir_date)
age = dir_date.get("sunwukong")
print(age)
dir_date2 = {"sunwukong": 28}
dir_date.update(dir_date2)
print("dir_date=", dir_date)
item_data = dir_date.items()
print(item_data)
key_data = dir_date.keys()
print(key_data)
value_datas = dir_date.values()
print(value_datas)
item_data = dir_date.pop("wangwu")
print(item_data)
set_data = set()
print("set_data=", set_data, ";", "type=", type(set_data))
list_date = [1, 2, 3, 4, 5, 4, 3, 2, 1]
set_data = set(list_date)
print("set_data=", set_data, ";", "type=", type(set_data))
str_data = "12321"
set_data = set(str_data)
print("set_data=", set_data, ";", "type=", type(set_data))
bytes_data = b'123321'
set_data = set(bytes_data)
print("set_data=", set_data, ";", "type=", type(set_data))
|