It's possible to access for some builtin iterators via __reduce__, e.g.:
xs = iter([8, 23, 45])
for x in xs:
print("item #{} = {}".format(xs.__reduce__()[-1], x))
But I'd prefer to use enumerate generally
For other builtinbuilt-in iterators (excluding i.e., for example, Generators and others), that cannot have their index retrieved via reduce, see my answer here if interested: Is it possible to get index of the next item from iterator?Is it possible to get index of the next item from iterator?