I have a dictionary like the following:
{2234:A0,432:A16,3336:A0,11:A0,3:A16}
and I want to sort the dictionary based on its keys like the following:
{3:A16,11:A0,432:A16,2234:A0,3336:A0}
Here is what I have tried but it doesn't sort the dictionary.
sorted(a_dict.items())
print(a_dict)