+ 1
What did
this code do. for i in range (x):
1 Answer
+ 3
its a for loop
range(x) will create a list of numbers from 0 to x
then for loop go through each an element in the list.
try below code for better understanding.
x= 3
for i in range(x):
print (i)
output:
0
1
2