fork(4) download
  1. def count_it(target):
  2. if len(target) < 2:
  3. return 0
  4. else:
  5. return (target[:2] == 'ou') + count_it(target[1:])
  6.  
  7. c = count_it('out and about')
  8.  
  9. print c
  10.  
Success #stdin #stdout 0.01s 6356KB
stdin
Standard input is empty
stdout
2