the code below runs a bound method of a user defined class. i don't understand why you can send instance of any class in that bound method. according to my understanding, you should only be allowed to send instances of the 'current class' or that of 'derived classes'. please explain this. any help is highly appreciated.
class class_name:
def function_name(self):
print("hello, world.")
a = 10
b = [1, "mayank"]
c = (2, "mahajan")
d = class_name()
class_name.function_name(a)
class_name.function_name(b)
class_name.function_name(c)
class_name.function_name(d)