Python Forum
difference between «1 in [2] == False» and «(1 in [2]) == False»
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
difference between «1 in [2] == False» and «(1 in [2]) == False»
#3
Thank's a lot for your response!
Everything is now clear to me.

Nevertheless, I must say that here Python syntax reachs the point where balance between compacity of notations and clarity can be discussed...It's not so natural (at least to me) to think that «in» and «==» operator can be chained in ANY case (which is allowed by Python): to me, to give proper meaning to «x in y == z» y should be a sequence, as should also z.

But that's another subject.

Thank's again for your help.
Reply


Messages In This Thread
RE: difference between «1 in [2] == False» and «(1 in [2]) == False» - by fbaldit - Apr-20-2020, 05:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pyinstaller false positives DPaul 2 1,320 Nov-10-2022, 10:46 AM
Last Post: carecavoador
  If function is false search next file mattbatt84 2 1,237 Sep-04-2022, 01:56 PM
Last Post: deanhystad
  Getting false even when data exists sriniyum 12 4,597 May-20-2021, 03:29 AM
Last Post: sriniyum
  how to return False in ternary condition KEYS 7 3,230 Dec-10-2020, 05:32 PM
Last Post: perfringo
  Why is the line crashing program when line is false? ErnestTBass 1 1,852 Aug-23-2020, 07:09 PM
Last Post: deanhystad
  else condition not called when if condition is false Sandz1286 10 6,102 Jun-05-2020, 05:01 PM
Last Post: ebolisa
  While loop = False NectDz 1 1,796 Jun-03-2020, 04:35 PM
Last Post: GOTO10
  While loop doesn't end when False Kanashi 2 2,648 Nov-21-2019, 02:38 AM
Last Post: Kanashi
  Do break operators turn while loop conditions from True to False? Drone4four 5 3,107 Oct-24-2019, 07:11 PM
Last Post: newbieAuggie2019
  Palindrome in Python - result always false RavCOder 13 7,011 Oct-16-2019, 01:38 PM
Last Post: perfringo

Forum Jump:

User Panel Messages

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