Explore your training options and get exclusive tuition discounts Get Started

X

Back

Global navigation

How to Remove Duplicates from a List in Python

Comments (1)
  1. Slade McDonough says:

    These methods work beautifully—unless your list contains elements that are themselves lists. Because a python list is not hashable, then both of these methods fail. So these methods do not make me ready to remove duplicates from a list “like a pro.”
    A pro would know what to do when these methods fail. Although the dictionary idea is brilliant. I didn’t know there was such a python function.

Leave a Reply

Your email address will not be published. Required fields are marked *

Start your Tech training
Find, compare, and enroll in the right training program. Save on Tuition.
View my matches