Victor wrote...
The function 'len' is a built-in function in Python. If you assign an
integer to the name 'len', that will replace the function with an int. And
you can't call an int.
My suggestion: Do not use 'len' as a variable name. Use something else, like:
directorycount= len(dirs)
Greetings,
<type 'builtin_functi on_or_method'>
6
<type 'int'>
Traceback (most recent call last):
File "<pyshell#4 >", line 1, in <module>
len("Victor")
TypeError: 'int' object is not callable
--
"The ability of the OSS process to collect and harness
the collective IQ of thousands of individuals across
the Internet is simply amazing." - Vinod Vallopillil
>len = len(dirs)
integer to the name 'len', that will replace the function with an int. And
you can't call an int.
My suggestion: Do not use 'len' as a variable name. Use something else, like:
directorycount= len(dirs)
Greetings,
>>type(len)
>>print len("Victor")
>>len=42
>>type(len)
>>len("Victor ")
File "<pyshell#4 >", line 1, in <module>
len("Victor")
TypeError: 'int' object is not callable
--
"The ability of the OSS process to collect and harness
the collective IQ of thousands of individuals across
the Internet is simply amazing." - Vinod Vallopillil