Hi everyone I want to ask about class.
What difference is:
class Test:
l = ['a', 'b', 'c']
def __init__(self):
pass
def t(self, a):
if a in self.l:
pass
and here:
class Test:
l = ['a', 'b', 'c']
def __init__(self):
pass
def t(self, a):
if a in Test.l:
pass
And why should I use version with self?