1

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.

Ry-
  • 209,133
  • 54
  • 439
  • 449
vibin siby
  • 11
  • 2

0 Answers0