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.
- 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