Skip to content

Instantly share code, notes, and snippets.

@sreevidyavutukuru
Created August 10, 2017 03:43
Show Gist options
  • Save sreevidyavutukuru/eb44e7abf208c147170c9dc4888c1c96 to your computer and use it in GitHub Desktop.
Save sreevidyavutukuru/eb44e7abf208c147170c9dc4888c1c96 to your computer and use it in GitHub Desktop.
def DiceCombinations(n,combinations):
if n == 0:
return combinations
temp = []
for val in range(1,7):
for com in combinations:
temp.append(str(val) + str(com))
n -= 1
return DiceCombinations(n,temp)
print DiceCombinations(1,[1,2,3,4,5,6])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment