I am using python for one of my projects, and i want to define some variables like #define in C so that if i want to change the value i can change it only at one place.
I know that we can use global variables. But, I don't want to specify the keyword "global" in all the functions where I use the variables.
Actually I want something like this.(This is just a random example!)
DEFINE_MAX = 100
def function1(num):
return num < DEFINE_MAX
def function2(num):
return num > DEFINE_MAX
The variable DEFINE_MAX might be used through out the application. So I want to define it at one common place.
So how can I do this in python?