Answers for "python string delete duplicates"

6

delete the duplicates in python

mylist = ["a", "b", "a", "c", "c"]
mylist = list(dict.fromkeys(mylist))

  print(mylist)
Posted by: Guest on May-19-2020
1

python remove repeated characters from string

''.join(list(dict.fromkeys(list(messagel))))
Posted by: Guest on May-07-2021

Code answers related to "python string delete duplicates"

Python Answers by Framework

Browse Popular Code Answers by Language