Created
April 8, 2017 07:18
-
-
Save abhinavkorpal/4b7237b1cf30bd73c93434b041d5564b to your computer and use it in GitHub Desktop.
List Comprehensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if __name__ == '__main__': | |
| x, y, z, n = int(input()), int(input()), int(input()), int(input()) | |
| print ([[a,b,c] for a in range(0,x+1) for b in range(0,y+1) for c in range(0,z+1) if a + b + c != n ]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment