Define a list: l = ["a", "b", "c", "a", "b", "c", "a"] , example below The list x used is this list
1. Destroy the original structure
2. for loop
3. Index method
The above is the detailed content of python how to get subscript in loop. For more information, please follow other related articles on the PHP Chinese website!