I've figured out how to list the values of a function with one variable. For that I just do the following:
def f(x):
return x*x
mylist = [f(x) for x in range(4)]
That's an example where it returns the first 4 values of integers of x squared, so 0, 1, 4, and 9. However, when I try to do something like
def f(x, y):
return x*x-y*y
I don't know how to format it, if possible here. Thanks in advance
Edit: Someone marked this as a duplicate, but the alternative has to do with how to combine different parts of a list into 1, when I'm asking for how to list the values of a multi variable function using the format said above.