Created
August 10, 2017 03:43
-
-
Save sreevidyavutukuru/eb44e7abf208c147170c9dc4888c1c96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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