Why ".upper()" but "max()"?


I don’t understand why we use “.xxx()” for some functions and use “xxx()” directely with the argument in the parentheses directely?


because max() is a built-in function, where as .upper() is a built-in method of string class

But to understand methods (function in a class), you need to understand classes first, so i recommend continuing with the course until you arrive at classes


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