Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
7
Task/String-matching/Python/string-matching.py
Normal file
7
Task/String-matching/Python/string-matching.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
"abcd".startswith("ab") #returns True
|
||||
"abcd".endswith("zn") #returns False
|
||||
"bb" in "abab" #returns False
|
||||
"ab" in "abab" #returns True
|
||||
loc = "abab".find("bb") #returns -1
|
||||
loc = "abab".find("ab") #returns 0
|
||||
loc = "abab".find("ab",loc+1) #returns 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue