On 2020-02-02, Stefan Ram <r...@zedat.fu-berlin.de> wrote:
> Greg Ewing <greg.ew...@canterbury.ac.nz> writes:
>>If the functions you're calling all return None, you can
>>do this:
>> >>> print(2); print(3)
>
>   »print(2); print(3)« is not an expression anymore but an stmt_list.
>   It cannot be used in all places where an expression is allowed.

Why does it matter if the return value is None?

"print(2), print(3)" is an expression that will evaluate all of its
sub-expressions. If the sub-expressions return None then I guess you
could do "(x, y, z)[0]" too.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to