Remove Duplicate from str

Run Settings
LanguagePython
Language Version
Run Command
#INPUT: String #Output: String def removeDuplicates(string): # Initializing set and list # Set for storing unique characters mySet = set() list = [] # Iterating input string for ch in string: if ch not in mySet: mySet.add(ch) list.append(ch) return ''.join(list) string = "Hello ClearTrail Technologies" print(removeDuplicates(string))
Editor Settings
Theme
Key bindings
Full width
Lines