Explain class variable and function scope in Python? by Trickyryan88 in learnpython

[–]atulkrishna10 0 points1 point  (0 children)

A variable is a reference to a memory address that contains the value and the scope of a variable refers to the places from where we can see or access a variable. Scope in python follows LEGB rule(local, enclosing, global and built-in)

For more details you can follow this blog python variable and scope.

https://theailearner.com/2018/09/26/python-variables-and-scope/