Skip to content

vvickedvveb/find-duplicates-in-list-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Find Duplicates In A List

Find Duplicates in a List in Python. Includes a hard to read one-liner comprehension (Seriously, I wrote this not too long ago and had to stare at it a bit.) and sets to find duplicates from a List.

Instructions

  • Copy the array: Everything in, and including square brackets ONLY and assign to 'list_with_possible_dupes'. e.g.: list_with_possible_dupes = ["400048","400048", "400049", "400199","400199", "400200", "400201", "400048"]
  • Run the script to find duplicates: e.g.:
python3 find_dupes_in_list.py