小编Qio*_*Liu的帖子

为什么python允许元组作为字典的键

python 中的元组可以有不同类型的元素。例如:

tup1 = ('physics', 'chemistry', 1997, 2000);
tup2 = (1, 2, 3, 4 );
Run Code Online (Sandbox Code Playgroud)

当用于字典中的键时,当元素大小变化时,python如何决定键的大小?

python dictionary tuples immutability

2
推荐指数
2
解决办法
3048
查看次数

标签 统计

dictionary ×1

immutability ×1

python ×1

tuples ×1