0
func used as a function was not defined. Why?
def add(x, y): return x + y def do_twice(func, x, y): return func(func(x, y), func(x, y)) a = 5 b = 10 print(do_twice(add, a, b))
2 Antworten
+ 4
in the code playground the result is 30 without an error. there's no point to define func, it can be any function
0
thought as much