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 = ["48","48", "49", "199","199", "200", "201", "048"]
- Run the script to find duplicates: e.g.:
python3 find_dupes_in_list.py