Why not use a dictionary for that?
This way you could add and remove values in/from your dictionary just as you wanted.
my_dict = {
'var1': 0,
'var2': 0,
...
}
You can delete by doing my_dict.pop('var1')
if you need the value back or del my_dict['var1']
otherwise and add items with my_dict['var3'] = 0
.
2
solved How to make a list of variables