I would like to print(use) some attributes of an object instance in the following way. But the code generates an error: AttributeError: 'Obj' object has no attribute 'alphabet'
class Obj(object):
def __init__(self):
self.a = 0
self.b = 1
Obj_instance = Obj()
l = ['a', 'b']
for alphabet in l:
print Obj_instance.alphabet