Say I have a dict:
d = {
'eggs': 4,
'cheese': 6,
'coconuts': 8,
}
Is is possible to loop over the dictionary, creating variables named after the keys, assigning them the corresponding value?
eggs = 4
cheese = 6
coconuts = 8
Or maybe inside an object?
self.eggs = 4
self.cheese = 6
self.coconuts = 8
Is this possible?