Why does Python give an error when I try to do this:
Traceback (most recent call last):
File "<pyshell#4 0>", line 1, in <module>
len(object=[1,2])
TypeError: len() takes no keyword arguments
but not when I use a "normal" function:
return len(object)
2
>>len(object=[1,2])
File "<pyshell#4 0>", line 1, in <module>
len(object=[1,2])
TypeError: len() takes no keyword arguments
but not when I use a "normal" function:
>>def my_len(object):
>>my_len(object =[1,2])
Comment