Comprehension Variable Versus For Loop Variable
squares = [n * n for n in range(5)]
for m in range(5):
pass
print(squares)
print(m)
print(n)
What happens when this runs?
Sign in to answer questions and track your progress
Sign Insquares = [n * n for n in range(5)]
for m in range(5):
pass
print(squares)
print(m)
print(n)
What happens when this runs?
Sign in to answer questions and track your progress
Sign In