Is it possible to add an empty dictionary with self parameters into a class so that I can add elements to it later with a defined method?
CodePudding user response:
To add an empty dictionary is just like adding any other variable:
class SomeClass:
def __init__(self):
self.empty_dict = {}