Proper use of objects in Python
# --- PYCode ---------------------- 1 : class myClass: 2 : def works_with (self): 3 : print("Hello!") 4 : 5 : def works_without(): 6 : print ("Hello!") 7 : 8 : # --- creating object --- 9 : mC = myClass() 10 : mC.works_with() # --- PYCode ---------------------- Case 1: I know that the proper way declaring objects in python is "mC = myClass()" and the above works. And if I leave everything as it is and replace the 10-th line to "mC.works_without()" it won't work. However: Case 2: If I change 9-th line to "mC = myClass" and 10-th line to "mC.works_without()" it will work. But if I change 5-th line to "def works_without(self):" and 9-th line to "mC = myClass" and 10-th line to "mC.works_without()" it won't work. So, how the objects in Python should be used and what are the differences between 2 cases above?