seleneyue

ps3a recursion

Dec 29th, 2011
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. def countSubStringMatchRecursive(key, target):
  2.     start = find(target, key) +1
  3.     if start == 0:
  4.         return 0
  5.     else:
  6.         return 1 + countSubStringMatchRecursive(key, target[start:])
Advertisement
Add Comment
Please, Sign In to add comment