lower versus length syntax in python?

L.Mazzini

I'm new to Python and I have a question about the string operations. Is there an over-arching reason that I should understand as to why the lower operation is written as 'variable.lower()' while another one, say length, would be written as 'len(variable)'?

Tay Frost

lower is a string method, that is, a function built in to the string object itself. It only applies to string objects.

len is a built in function, that is, a function available in the top namespace. It can be called on many different objects (strings, lists, dicts) and isn't unique to strings.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

DAX Syntax - if versus switch

From Dev

Python: urlopen() versus CURL

From Dev

Python sets versus arrays

From Dev

syntax confusion: function call versus array indexing

From Dev

Mysql Syntax "if length then" statement

From Dev

Scala syntax strangeness with :: and requiring lower case

From Dev

Float versus Logged values in Python

From Dev

python "if" versus "and" function execution order

From Dev

PHP bcmath versus Python Decimal

From Dev

importing with * (asterisk) versus as a namespace in python

From Dev

Dictionary in python will not print completely (is versus ==)

From Dev

python operator 'in' versus regular expressions

From Dev

python .lower() is not working

From Dev

system python versus user python in 2.7

From Dev

CSS Selector [type="var"] not selecting lower-alpha versus upper-alpha

From Dev

CSS Selector [type="var"] not selecting lower-alpha versus upper-alpha

From Dev

% syntax in Python

From Dev

Python list.index() versus dictionary

From Dev

Relational database versus R/Python data frames

From Dev

Comparing Performance in Python: equal versus non equal

From Dev

“Class” versus “namedtuple” to simulate a deck in Python

From Dev

Python Array Memory Footprint versus List

From Dev

Getting Python to round Timestamp with NS versus Truncate

From Dev

forget versus grid_forget (python)

From Dev

Python list.index() versus dictionary

From Dev

“Class” versus “namedtuple” to simulate a deck in Python

From Dev

Installing pymysql for Python 2.5.1 or lower

From Dev

Lower the Python3 version

From Dev

SystemVerilog foreach syntax for looping through lower dimension of multidimensional array

Related Related

HotTag

Archive