Define the class before you use it:
class Something:
def out(self):
print("it works")
s = Something()
s.out()
You need to pass self as the first argument to all instance methods.
Define the class before you use it:
class Something:
def out(self):
print("it works")
s = Something()
s.out()
You need to pass self as the first argument to all instance methods.