HomeBlogPrioritizing tasks in python3 using dictionary and list in python ?Problem and SolutionsPrioritizing tasks in python3 using dictionary and list in python ?By M.K. Verma · 3 May 2022Try to start from this: tasks_to_do_today = ["cleaning", "dishes", "vacuuming", "cooking"] print(sorted(tasks_to_do_today, key=lambda x: labels_priority[x])) Python removes duplicates in a dictionary, not in a list.Share this:CommentsLeave a commentPost