Created
January 16, 2017 13:16
-
-
Save Kruptein/2cbe7e4d58241a8c7207c09e32d87e91 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
final = '' | |
for i in range(len(s)): | |
if i == len(s) - 1: | |
final = s | |
elif s[i] > s[i+1]: | |
final = s[:i] | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment