Use a for loop to iterate over range(1, 6)
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
Problem
Use a for loop to iterate over range(1, 6). After the loop ends, print the value of the loop variable i. (Remember: loop variables persist after the loop.)
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.