Simple question
Chris Angelico
rosuav at gmail.com
Sat Aug 23 09:19:57 EDT 2014
On Sat, Aug 23, 2014 at 11:10 PM, <explodeandroid at gmail.com> wrote:
> Can some one explain why this happens:
> True, False = False, True
> print True, False
> False True
Well, the first line changes the meanings of the names "True" and
"False", but doesn't change the things they point to. Those things
describe themselves the same way. Here's another thing you can do that
will look the same:
a, b = False, True
print a, b
False True
Fortunately, newer versions of Python don't let you reassign True and False.
ChrisA
More information about the Python-list
mailing list