Skip to content

Instantly share code, notes, and snippets.

Created September 7, 2016 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/517607265f6c60cd4d0a94d76018460f to your computer and use it in GitHub Desktop.
Save anonymous/517607265f6c60cd4d0a94d76018460f to your computer and use it in GitHub Desktop.
special = []
def ngetmprint(list, m):
if m == len(list):
if not list in special:
special.append(list)
else:
for i in range(len(list)):
ngetmprint(list[:i] + list[i + 1:],m)
ngetmprint([1,2,3,4,5],2)
print(special)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment