I have the following method,
def MySampleMethod():
return "Sample method called"
I tried the following code,
MySampleMethod.variablename = "Some data"
print MySampleMethod.variablename
The code executed without error and printed "Some data
".
How is it possible to assign a variable to a function and how it works ?