Advertisement
Guest User

Untitled

a guest
Nov 27th, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. def povtor(xs,numb,a=[]):
  2. i=0
  3. while i<numb:
  4. return povtorhelp(xs,numb,i+1,a+[xs[i]])
  5. i+=1
  6.  
  7. def povtorhelp(xs,numb,i,a=[]):
  8. if len(a) < numb:
  9. while i< numb:
  10. return povtorhelp(xs,numb,i+1,a+[xs[i]])
  11. i+=1
  12. else:
  13. return a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement