You are viewing a single comment's thread. Return to all comments →
print ([[a,b,c] for a in range(int(input())+1) for b in range(int(input())+1) for c in range(int(input())+1) if a+b+c!=int(input())])
why does this code not work? can you explain?
List Comprehensions
You are viewing a single comment's thread. Return to all comments →
print ([[a,b,c] for a in range(int(input())+1) for b in range(int(input())+1) for c in range(int(input())+1) if a+b+c!=int(input())])
why does this code not work? can you explain?