Created
June 9, 2018 08:55
-
-
Save navidanindya/02c2d1c67ff71fd0955c18ebebb7670a to your computer and use it in GitHub Desktop.
Get unique characters from two strings and return a sorted substring (Python) [ Link: https://repl.it/@nealtheguitaris/SoggyCruelPipeline ]
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
def longest(s1, s2): | |
return ''.join(sorted(set(s1 + s2))) | |
print(longest('aaaabbbdddccc','aadfafiseitaabbbss')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment