<jupyter_start><jupyter_text>iter dict<jupyter_code>d = {'a': 1, 'b': 2, 'c': 3}
# iter each key:
print('iter key:', d)
for k in d.keys():
    print('key:', k)
# iter each value:
print('iter value:', d)
for v in d.values():
    print('value:', v)
# iter both key and value:
print('iter item:', d)
for k, v in d.items():
    print('item:', k, v)<jupyter_output>iter item: {'a': 1, 'b': 2, 'c': 3}
item: a 1
item: b 2
item: c 3
{'fraction_non_alphanumeric': 0.2235294117647059, 'fraction_numerical': 0.021176470588235293, 'mean_word_length': 4.132530120481928, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '624485', 'license': 'Apache-2.0', 'n_tokens_mistral': 195, 'n_tokens_neox': 184, 'n_words': 64, 'path': 'advance/iter_dict.ipynb', 'repo_name': 'WallaceLiu/python_learn', 'size': '425'}