I'm new to Python. I am getting the error TypeError:dict object is not callable
. I haven't used dictionary anywhere in my code.
def new_map(*arg1, **func):
result = []
for x in arg1:
result.append(func(x))
return result
I tried calling this function as follows:
new_map([-10], func=abs)
But when I run it, I am getting the above error.