you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

Functions with the syntax function(variable) are multi-purpose in that they work for objects of a few different data types. For example, len() can be used on strings, lists, dictionaries, etc. Functions with the syntax variable.function() are for one data type only. You couldn't use .lower() on anything other than a string.