fork download
  1. def fun(text,word):
  2. i=0
  3. while text.find(word)!=-1:
  4. i+=1
  5. text=text[text.find(word)+1:]
  6. fun(text,word)
  7. return i
  8.  
  9.  
  10. print fun('asdasdasd','a')
  11.  
Success #stdin #stdout #stderr 0.03s 42064KB
stdin
Standard input is empty
stdout
3
stderr
Warning: cannot find your CPU L2 cache size in /proc/cpuinfo