Advertisement
amenina2208

Untitled

Sep 15th, 2019
523
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. l=[50,50,50,20,20,20,20,20,20,10,10,10,10,10,5,5,5]
  2. from itertools import combinations
  3. c= list(combinations(l,4))
  4. #print (c)
  5. for n in range(0,len(c)):
  6. d= (c[n][0]+c[n][1]+c[n][2]+c[n][3])
  7. if d==80:
  8. l=[]
  9. l.append(d)
  10. print (l)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement