循环浏览冻结集中的前3个元素

时间:2019-01-22 14:45:32

标签: python frozenset

如何遍历冻结集中的前三个元素。

frozen_set = frozenset(["e", "f", "g","h","i","j","k"]) 

for x in itertools.islice(frozen_set,1,3):
    print(x)

0 个答案:

没有答案