Follow function references after reassignment

A developer saves a reference to a Python anonymous function before replacing the function associated with its original variable. What does the final line print?


Python
convert = lambda n: n + 9
saved = convert
convert = lambda n: 2 * n
print(saved(4), convert(4))
Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Lambda Abstraction Questions: