Advertisement
sigmachto

Untitled

Jul 21st, 2023
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. numbers = '0123456789'
  2. letters = 'qwertyuiopasdfghjklzxcvbnm'
  3. s = input()
  4. a = [s[i] for i in range(len(s)) if s[i] in numbers]
  5. b = [s[i] for i in range(len(s)) if s[i] in letters]
  6. if len(b) == 0:
  7.     print('NO')
  8. else:
  9.     m1 = set(a)
  10.     a = list(m1)
  11.     a.sort()
  12.  
  13.     print(*a,sep='')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement