O'Reilly logo
  • Chris Kang thinks this is interesting:

This function lists variables assigned in the caller’s scope when called with no argument

From

Cover of Learning Python, 5th Edition

Note

dir() will give you all variables available to the scope where this was called.