Hello,
> This would be a great question to ask Guido (inventor of Python)--we
> get it from there.
a similar question is answered in the Python FAQ:
http://www.python.org/doc/faq/general/#why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list
"4.7
On Tue, Apr 14, 2009 at 11:05 PM, Robert Bradshaw
wrote:
>
> On Apr 14, 2009, at 10:08 PM, Nasser Abbasi wrote:
>
>> I create a list, using
>>
>> v=[1..10]
>>
>> Now, I wanted to find the length of 'v'. I did help(list) and do not
>> see a method to find the length of a list object.
>>
>> Then lo
On Apr 14, 2009, at 10:08 PM, Nasser Abbasi wrote:
> I create a list, using
>
> v=[1..10]
>
> Now, I wanted to find the length of 'v'. I did help(list) and do not
> see a method to find the length of a list object.
>
> Then looking more around, I found I can type
>
> len(v)
>
> to find the length