My query is on the below program with respect to symbols that are storing values and functions, when ran on http://pythontutor.com/.
In Python, don't worry so much about memory segments and what goes on behind the scenes. Rather, environments (scopes) are more important. The block-and-pointer diagram you included is a reasonable way to visualize the memory. The white portion shows what the global environment looks like. When the function is called, a new (blue) environment is created.
const is a variable. Variables in Python are weakly dynamically typed, and can store anything. In fact, Python integers don't overflow, and can store numbers exceeding 264. In this case, const is a variable (with a confusing name) that contains the number 2.
A function is an abstract notion of a callable blob of code. You can assign it to a variable just like any other value.
You could consider it a function pointer if it makes you feel comfortable, but then you would be outing yourself as a C programmer. A Python programmer would just say that op has the function sub as a value.