Skip to content

Instantly share code, notes, and snippets.

@Kruptein
Created January 16, 2017 13:16
Show Gist options
  • Save Kruptein/2cbe7e4d58241a8c7207c09e32d87e91 to your computer and use it in GitHub Desktop.
Save Kruptein/2cbe7e4d58241a8c7207c09e32d87e91 to your computer and use it in GitHub Desktop.
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