I need to make a two dimensional dictionary in python. e.g. new_dic[1][2] = 5
When I make new_dic = {}, and try to insert values, I get a <
Do you mean dict or list?
And if you mean dict do you want the second level to be another dict? or a list?
For a dict to work you need to have declared the keys ahead of time.
So if it's dicts in dicts you need something like this:
new_dic = {}
try:
new_dic[1][2] = 5
except KeyError:
new_dic[1] = {2:5}