Here is the translated code example and explanation.
Range over Built-in Types
range iterates over elements in a variety of built-in data structures. Let’s see how to use range with some of the data structures we’ve already learned.
To run the program, save the code in a .py file and use python to execute it.
Now that we can use range to iterate over various data structures in Python, let’s explore more features of the language.