First time here? Check out the FAQ!
answered 7 years ago
p.variables() returns a tuple which contains the variables of p, so your function could be written:
p.variables()
p
def f(q): return q*q.variables()[0]