I print an item twice with indentation, and it prints the values of the item in iterated format. But when I print an item without indentation (I mean after the loop ends) it only prints the last value of item.
Here in the code it is 3
. Why?
for item in (1,2,3):
print(item)
print(item)
print(item)
output:
1
2
3
1
2
3
3