Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- l=[50,50,50,20,20,20,20,20,20,10,10,10,10,10,5,5,5]
- from itertools import combinations
- c= list(combinations(l,4))
- #print (c)
- for n in range(0,len(c)):
- d= (c[n][0]+c[n][1]+c[n][2]+c[n][3])
- if d==80:
- l=[]
- l.append(d)
- print (l)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement