Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(string, substring):
- for i in range(len(string)):
- if substring[0] == string[i] and substring in string:
- return i
- return -1
- print(f('ahoj', 'hoh'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement