Skip to content

Instantly share code, notes, and snippets.

@pykong
Last active November 12, 2017 09:09
Show Gist options
  • Save pykong/f69a4a3101562de4c892dc2d761f7057 to your computer and use it in GitHub Desktop.
Save pykong/f69a4a3101562de4c892dc2d761f7057 to your computer and use it in GitHub Desktop.
old_string = "this is going to have a full stop. some written sstuff!"
k = old_string.rfind(".")
new_string = old_string[:k] + ". - " + old_string[k+1:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment