Here is my code. What is the simplest way to call the example function?
class Sample():
def example(x, y):
z = x + y
print(z)
return z
I would really appreciate a nice description of it.
Here is my code. What is the simplest way to call the example function?
class Sample():
def example(x, y):
z = x + y
print(z)
return z
I would really appreciate a nice description of it.
You can call it directly:
Sample.example(1, 2)