I have a dictionary for a text-RPG I'm working on in Python 3.9. I want to know if the list, 'atk', embedded in the dictionary can grow as the player obtains new weapons, or perhaps when they level up.
'atk', in my code, refers to the lowest and highest possible value of damage that can be inflicted on the opponent.
Mostly, I am concerned with adding a value to a list [5,13], a value such as 1, that will update my list to [6,14]. Note that "atk += 1" does not work, nor does "atk += [1,1]". Sorry if this has been covered elsewhere. If so, please link me.
char = {'name' : 'Hero',
'lv': 3,
'xp': 0,
'lvnext': 83,
'gp' : 5,
'bag' : ["Bronze Spear"],
'stats' : {'ATT': 1,
'DEF': 1,
'WIS': 1,
'hp' : 100,
'atk' : [5,13]}}