x = int(input()) y = int(input()) n = int(input()) print([i,j] for i in range(x+1) for j in range(y+1) if (((i+j) !=n)))The goal is to print all possible coordinates.
I receive a generator object message. Don't understand why.
and when I change print line to
print[[x,y,z] [b]for [/b]i in range(x+1) for j in range(y+1) for z in range(z+1) if ((x+y+z) !=n )]it gives "SyntaxError: invalid syntax" message pointing to bolded for.