Advertisement
awsmpshk

Redkie bykvi

Dec 12th, 2021
813
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. st = input()
  2.  
  3. res_set = set()
  4. to_be_deleted = []
  5. for ch in st:
  6.     if not ch in res_set:
  7.         res_set.add(ch)
  8.     else:
  9.         to_be_deleted.append(ch)
  10.  
  11. for item in to_be_deleted:
  12.     res_set.discard(item)
  13.  
  14. print(''.join(list(sorted(res_set))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement