Step-by-step Execution:
-
Outer Loop (for i in range(0, 1)):
- range(0, 1) generates the sequence [0], so the loop runs once with i = 0.
- It prints 0.
-
Inner Loop (for j in range(0, 0)):
- range(0, 0) generates an empty sequence [] (because 0 to 0-1 is an empty range).
- Since the range is empty, the inner loop does not execute at all.
- No value of j is printed.
Output:
The inner loop never runs, so only i = 0 is printed.
0 Comments:
Post a Comment