Created
July 14, 2021 07:22
-
-
Save codewithpom/36cfa17c4bced385299cc0254363ae7c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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