Last answered:

20 May 2024

Posted on:

19 May 2024

0

Resolved: If those are functions, why don't we close it with a colon and execute "return" this time?

In the previous chapter the functions "def" ends with a colon to designate the next indentation line. And then we execute with the prompt "return". Why not here?

1 answers ( 1 marked as helpful)
Instructor
Posted on:

20 May 2024

0

Hi Phanas!

Thanks for reaching out!

In Python, built-in functions are predefined functions provided by the language. These don't need to be defined by the user. When using built-in functions, you simply call them by their name and provide any necessary arguments. There’s no need to define them with def and a colon(:), or to use return, as these functions are already implemented and ready to use.

Hope this helps.

Best,

Ivan

Submit an answer