Skip to content

Instantly share code, notes, and snippets.

@efraintorlo
Created March 2, 2016 01:05
Show Gist options
  • Select an option

  • Save efraintorlo/a84c1b19823ec89a21b1 to your computer and use it in GitHub Desktop.

Select an option

Save efraintorlo/a84c1b19823ec89a21b1 to your computer and use it in GitHub Desktop.
Get last word in string
s = "some string with words"
put_value_in_list = s.split()
last_word = put_value_in_list[-1]
print last_word
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment