Python Forum
Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What does this mean?
#2
0 == ( 1 == 2 )
true
( 1 == 2 ) evaluates to False. 0 == False evaluates to True because 0, None and an empty value in Python are False.

0 == 1 == 2
False
0 == 1 evaluates to False. False == 2 evaluates to False because all numbers which are not 0 are evaluated to True. So False is not euqal to True
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
What does this mean? - by Giulio - Sep-06-2017, 03:42 PM
RE: What does this mean? - by wavic - Sep-06-2017, 04:17 PM
RE: What does this mean? - by Mekire - Sep-06-2017, 04:32 PM
RE: What does this mean? - by wavic - Sep-06-2017, 07:20 PM
RE: What does this mean? - by Mekire - Sep-06-2017, 07:32 PM
RE: What does this mean? - by wavic - Sep-06-2017, 07:44 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020