The Python return Statement: Implicit and Explicit return

preview_player
Показать описание
The Python return statement is a key component of functions and methods. You can use the return statement to make your functions send Python objects back to the caller code. These objects are known as the function’s return value. You can use them to perform further computation in your programs.

You'll learn about implicit vs explicit returns, and the differences in printing vs returning values or objects.

Рекомендации по теме
Комментарии
Автор

I'm confused about when you start to bring up list comprehension. num%2 for an even number is 0, which is what we want. So why is that not enough to satisfy the equation?

youngblack
Автор

Thank you so much

what would return -1 do ???

mrjt
Автор

Really wish expanations of why to place not, what is the for, in and if statements etc. Rather than just "do this because it works". idk something more in depth and explains certain things rather than, b/c it is 0 we need the Not operator sos type in not. okay so? thatdoesnt teach me anything.

coldCoders
welcome to shbcf.ru