-
-
Save IndhumathyChelliah/6f60e3ae249f88253969f236e038f69c to your computer and use it in GitHub Desktop.
This file contains 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
s1="example of strings" | |
#starting and ending index is not given. | |
print (s1.startswith("ex"))#Output:True | |
#starts searching from index 5. | |
print (s1.startswith("le",5,20))#Output:True | |
#suffix can be tuple of suffixes also. | |
print (s1.startswith(("example","of")))#Output:True | |
print (s1.startswith("example of"))#Output:True | |
print (s1.startswith("hello"))#Output:False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment