Skip to content

Instantly share code, notes, and snippets.

@zed
Created November 26, 2016 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zed/e9b797aa0d2d73a8eed61331660c58f0 to your computer and use it in GitHub Desktop.
Save zed/e9b797aa0d2d73a8eed61331660c58f0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
"""O(n**2) solution for small input or alphabet"""
text = input('Введите строку: ') # Ой ёж ежовый
uniq = ''
for char in text:
if char not in uniq:
uniq += char
print(uniq)
# -> Ой ёжовый
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment