Read Time, Not Definition Time
def make_reader(start):
val = start
def read():
return val
val += 10
return read
r1 = make_reader(1)
r2 = make_reader(100)
print(r1(), r2())
What does this print?
Sign in to answer questions and track your progress
Sign In