Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Removal of duplicates
#2
One way to eliminate duplicates would be to convert to a set, then convert back again.
1. Read the words into a list.
2. Convert the items to lower case.
3. Copy the list to a set
4. Copy the set back to a list
Reply


Messages In This Thread
Removal of duplicates - by teebee891 - Feb-01-2021, 11:54 AM
RE: Removal of duplicates - by jefsummers - Feb-01-2021, 12:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  remove partial duplicates from csv ledgreve 0 800 Dec-12-2022, 04:21 PM
Last Post: ledgreve
  Removal of items in .txt using python nanakochan 8 1,779 Sep-02-2022, 04:58 PM
Last Post: perfringo
  Problem : Count the number of Duplicates NeedHelpPython 3 4,397 Dec-16-2021, 06:53 AM
Last Post: Gribouillis
  Displaying duplicates in dictionary lokesh 2 2,000 Oct-15-2020, 08:07 AM
Last Post: DeaD_EyE
  how do i pass duplicates in my range iterator? pseudo 3 2,365 Dec-18-2019, 03:01 PM
Last Post: ichabod801
  Deleting duplicates in tuples Den 2 2,771 Dec-14-2019, 10:32 PM
Last Post: ichabod801
  Vertical Seam Removal scott14 0 1,953 Dec-27-2018, 03:03 AM
Last Post: scott14

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020