Try 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.
* Be the first to Make Comment