Skip to content

Instantly share code, notes, and snippets.

@codewithpom
Created July 14, 2021 07:22
Show Gist options
  • Save codewithpom/36cfa17c4bced385299cc0254363ae7c to your computer and use it in GitHub Desktop.
Save codewithpom/36cfa17c4bced385299cc0254363ae7c to your computer and use it in GitHub Desktop.
# create a string variable
name = "Padmashree"
# print every word after the fifth charachter
print(name[5:])
# prints shree
# print every word before the fifth charachter
print(name[:5])
# prints Padma
# Have Fun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment