Are you still using range(len(items)) in Python? There's a cleaner and more Pythonic way: enumerate(). With enumerate(), you get both the index and the item in a single loop, making your code easier to read and maintain.
for i, item in enumerate(items):
print(i, item)
This tip is a favorite among Python developers who value readability and efficiency. Next time you're iterating, give enumerate() a try!