Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # b_seqCombos.py
- def seqco(s,r=3):
- t = []
- while len(s) > r-1:
- sss = s[:]
- while len(sss) > r-1:
- t.append(sss[:r])
- sss.pop(r-1)
- s = s[1:]
- return t
- print seqco([0,1,2,3,4])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement