def f(x, y):
return (x**2 + y**2 if x < 0 else
2*x**2 - y**2 + x*y if 0 <= x < 1 else
x**2 + 2*y**2 -x + y
)
a = {f(x == 1, y == 2) for x in range(-10, 10) for y in range(5)}
d = {f(x == 1, y == 2)}
c = {f(x = 1, y = 2)}
print(a)
print(d)
print(c)
Use only one = sign. But then, it would be the same as c. So, what exactly are you trying to obtain or what did you think would be different with respect to c?