Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 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