字符串
my_str = "abc"
利用拆包
value1, value2, value3 = my_str
print(value1, value2, value3)
列表
my_list = [1, 2]
value1, value2 = my_list
print(value1, value2)
元组
my_tuple = (4, 2)
value1, value2 = my_tuple
print(value1, value2)
字典
my_dict = {"name": "test", "age": 18}
a, b = my_dict
print(a, b)
values方法表示获取字典中的所有value值
value1, value2 = my_dict.values()
print(value1, value2)