In init method in a class I want to read keys as self.key from a dict kwarg and assign values to them. Look at code to understand.
class Abc:
def __init__(self,**kwarg):
for key,value in kwarg.items():
self.key = value
obj = class(name = 'josh', age = 23, country = 'UK')
print(dir(obj))
obj has only key attribute. I get it why it has key. But I don't know how to read keys to self.key? I think you can get the question. What I except is obj must have name, age, country attributes