You can unpack values of each dict to LegoGame
constructor:
import json
...
with open(filename) as f:
lst = json.load(f)
result = [LegoTheme(*obj.values()) for obj in lst]
CLICK HERE to find out more related problems solutions.
You can unpack values of each dict to LegoGame
constructor:
import json
...
with open(filename) as f:
lst = json.load(f)
result = [LegoTheme(*obj.values()) for obj in lst]
CLICK HERE to find out more related problems solutions.