I am a complete beginner to programming so this may be a ridiculous or simple question.
I am trying to understand exactly what a "method" is. The standard answer is that it is a function associated to a class. The syntax seems to be something like user Gustav Rubio's answer which is,
class Door:
def open(self):
print 'hello stranger'
def knock_door:
a_door = Door()
Door.open(a_door)
knock_door()
So the the method is open() since it is associated with the class Door.
But if we define a list, we can also use the "append method", which looks something like
my_list = ["milk", "eggs"]
my_list.append("bread")
So does this mean that every list is a class? Since we are writing it in the form class_name.method_name? In general, is every variable a special case of a class? Or is there some other use of the term "method" here?
Again I apologise if this is too basic for this form. I was also wondering if there is a non-overflow version, much like mathstackexchange vs mathoverflow for more basic questions like this?