Issue
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.
Solution
You can call it directly:
Sample.example(1, 2)
Answered By – Sean Xie
Answer Checked By – Pedro (BugsFixing Volunteer)