Skip to content

Instantly share code, notes, and snippets.

@deconstructionalism
Created April 12, 2019 18:00
Show Gist options
  • Select an option

  • Save deconstructionalism/fb24fd767ae74b3355fb596e9f53cb2b to your computer and use it in GitHub Desktop.

Select an option

Save deconstructionalism/fb24fd767ae74b3355fb596e9f53cb2b to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from itertools import combinations
USER_TYPES = [
'Instructor',
'Course Preparer',
'Mentor',
'Student',
'Observer',
'Administrator'
]
user_combinations = []
for n in range(1, len(USER_TYPES) + 1):
user_combinations.extend(list(combinations(USER_TYPES, n)))
with open('output.txt', 'w') as f:
for line in user_combinations:
f.write(' '.join(line))
f.write('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment