Capgemini interview question

Sort a list by dictionary