I have a dict
dictExample = {4:'Yellow',2:'White',3:'Blue',1:'Black'}
I need it get sorted based on Id as a dict
Desired output:
{1:'Black',2:'White',3:'Blue',4:'Yellow'}
which should be a dict
Can some one help me. I am new to python.
I have a dict
dictExample = {4:'Yellow',2:'White',3:'Blue',1:'Black'}
I need it get sorted based on Id as a dict
Desired output:
{1:'Black',2:'White',3:'Blue',4:'Yellow'}
which should be a dict
Can some one help me. I am new to python.