<jupyter_start><jupyter_text>iter list<jupyter_code>for x in [1, 2, 3, 4, 5]:
    print(x)<jupyter_output>1
2
3
4
5<jupyter_text>iter list<jupyter_code>for x in iter([1, 2, 3, 4, 5]):
    print(x)<jupyter_output>1
2
3
4
5<jupyter_text>iter list next<jupyter_code>it = iter([1, 2, 3, 4, 5])
print(next(it))
print(next(it))
print(next(it))
print(next(it))
print(next(it))
try:
    while True:
        x = next(it)
        print(x)
except StopIteration as s:
    print(s)<jupyter_output><jupyter_text>iter list with index<jupyter_code>for i, value in enumerate(['A', 'B', 'C']):
    print(i, value)<jupyter_output>0 A
1 B
2 C<jupyter_text>iter complex list<jupyter_code>for x, y in [(1, 1), (2, 4), (3, 9)]:
    print(x, y)<jupyter_output>1 1
2 4
3 9
{'fraction_non_alphanumeric': 0.1686746987951807, 'fraction_numerical': 0.0535475234270415, 'mean_word_length': 4.936507936507937, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '211896', 'license': 'Apache-2.0', 'n_tokens_mistral': 375, 'n_tokens_neox': 348, 'n_words': 84, 'path': 'advance/iter_list.ipynb', 'repo_name': 'WallaceLiu/python_learn', 'size': '747'}