Created
November 1, 2014 12:51
-
-
Save chamix/b7fae83450baec0a3e35 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 combination (n, m): | |
combs = [(x, y) for x in range() for y in range(m) if x != y] | |
#combs.extend([(x, y) for x in range(m) for y in range(n) if x != y]) | |
for comb in combs: | |
print(comb, end='\n') | |
combination(3, 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment