Created
October 20, 2021 09:27
-
-
Save naemazam/5989a3f0da5cbc05da52e393bfefd29a to your computer and use it in GitHub Desktop.
Enter a non empty string. After removing duplicate characters, sort from small to large and output it as a new string.
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
user_input = input("Enter a string:") | |
new_string = sorted(set(user_input)) | |
new_data = "".join(new_string) | |
print(new_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment