>>> class Abcd:
... a = ''
... menu = ['a', 'b', 'c']
...
>>> a = Abcd()
>>> b = Abcd()
>>> a.a = 'a'
>>> b.a = 'b'
>>> a.a
'a'
>>> b.a
'b'
It's all correct and each object has own 'a', but...
>>> a.menu.pop()
'c'
>>> a.menu
['a', 'b']
>>> b.menu
['a', 'b']
How could this happen? And how to use list as class attribute?
This is because the way you're initializing the menu property is setting all of the instances to point to the same list, as opposed to different lists with the same value.
Instead, use the __init__ member function of the class to initialize values, thus creating a new list and assigning that list to the property for that particular instance of the class:
class Abcd:
def __init__(self):
self.a = ''
self.menu = ['a', 'b', 'c']