Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from string import *
- def countSubStringMatchRecursive(target,key):
- count = 0
- if find(target,key) == -1:
- return count
- else:
- target = target[(find(target,key) + len(key)):]
- count += 1
- countSubStringMatchRecursive(target,key)
- print countSubStringMatchRecursive("jfrqewouvjfuorqupweocjfl","jf")
Add Comment
Please, Sign In to add comment