def removeDuplicate(str, n):
          s = set()
          # Create a set using String characters
          for i in str:
              s.add(i)
          # Print content of the set
          st = ""
          for i in s:
              st = st+i
          return st
      # Driver code
      str = input("Enter string: ")
      n = len(str)
      print(removeDuplicate(list(str), n))
      
      Python language logo

      Remove Duplicates

      Remove duplicates from a string

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.