Created
November 26, 2016 07:25
-
-
Save zed/e9b797aa0d2d73a8eed61331660c58f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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