Home / Python Tips Generated By ChatGPT / Using enumerate() for Index and Value in Python Get both the index and the value when looping over a list. Source Code for index, value in enumerate(my_list): print(f"Index: {index}, Value: {value}")