Skip to content

Instantly share code, notes, and snippets.

@MSWon
Created June 11, 2019 08:05
Show Gist options
  • Save MSWon/587d4b782d58d422ad057dd8a8ed0c7e to your computer and use it in GitHub Desktop.
Save MSWon/587d4b782d58d422ad057dd8a8ed0c7e to your computer and use it in GitHub Desktop.
getting all possible cases
x = [1,2,3,4,5,6,7,8,9,10]
total_case = []
for i in x:
first = [i]
for j in x:
c_first = list(first)
if(i < j):
c_first.append(j)
total_case.append(c_first)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment