MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / combination

Function combination

LuaSTGPlus/string2enum.py:13–19  ·  view source on GitHub ↗
(seq, length)

Source from the content-addressed store, hash-verified

11 return ret
12
13def combination(seq, length):
14 if not length:
15 yield []
16 else:
17 for i in xrange(len(seq)):
18 for result in combination(seq[i+1:], length-1):
19 yield [seq[i]] + result
20
21def charat(key, idx):
22 if idx >= len(key):

Callers 1

find_best_indicesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected