Dear list,

from Guido's tutorial:

It is possible to assign the result of a comparison or other Boolean
expression to a variable. For example,

        >>> string1, string2, string3 = '', 'Trondheim', 'Hammer Dance'
        >>> non_null = string1 or string2 or string3
        >>> non_null
        'Trondheim'

How does this work?? How does Python know that we are looking for
non_null? After all, we don't provide this information here, right? (I
take non_null is a variable.)
I must be missing something... Can anyone help?

Many thanks,

Guba

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to