(May-14-2018, 08:52 PM)Truman Wrote:print([[x,y,z] for i in range(x+1) for j in range(y+1) for k in range(z+1) if i+j+k != n])
(May-17-2018, 07:56 PM)Truman Wrote: I would appreciate anyone's opinion on why my previous line of code doesn't work. It doesn't look complicated but still it doesn't give me the output that I want.well, that's the correct output.
Probably you were thinking of writing
print([[i,j,k] for i in range(x+1) for j in range(y+1) for k in range(z+1) if i+j+k != n])
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs