Len(str) and str.upper(),


#1

len(str) and str.upper(), why not str.len()?


#2

len() is a built in function for determining length of an iterable such as a string or a list. It is not a member method of the String or List classes, but a stand alone function.

str.upper() is a member method of the String class, We don't pass an argument. Instead, the method acts upon the owner object context, in this case str.


#3

Thanks, that was clear!


#4

A post was split to a new topic: Strings - need help on this part


#5