Why does the variable sometimes go inside the parentheses and sometimes before the function


Is there a good way to think about the difference when a variable should go inside the parentheses versus when it should go before a function?

e.g.: variable.lower() vs str(variable)

Strings and Console Output


.lower() is a method, its specific to a data type.

str() is a (built-in) function

later in the course you will learn about function and classes, then you will also better understand this different notation.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.