I'm making a basic dungeon simulator in Python, and I want to know how to work with the variables I'm using. They aren't just like the normal variables; the structure looks like this:
weapons: {
swordType: {
daggers: {
cardboard: {
brokenCardboardDagger: {
damage: 1,
critDamage: 3,
}
}
}
}
}
(There are more swords and more materials, but I am just providing an outline as to what they look like in the code)
So, looking at this type of variable, how would I, for example, print the damage of a sword? Or, how would I concatenate it so that the line of code would look something like this?
print "Your sword's damage is" + [special variable code]
Thanks for the help.