Python Forum
Can I check multi condition for 1 item in a easy way?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I check multi condition for 1 item in a easy way?
#2
"if not item or item in Error_list" will work, but not "not item" is also true for 0, empty container objects, and blank strings. Have you tried using "any()"?
Reply


Messages In This Thread
RE: Can I check multi condition for 1 item in a easy way? - by deanhystad - Apr-28-2022, 02:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Remove an item from a list contained in another item in python CompleteNewb 19 5,951 Nov-11-2021, 06:43 AM
Last Post: Gribouillis
  Check all input, easy way! Help pls! bntayfur 2 1,860 Jul-05-2020, 10:58 PM
Last Post: bntayfur
  else condition not called when if condition is false Sandz1286 10 6,038 Jun-05-2020, 05:01 PM
Last Post: ebolisa
  [HELP] Nested conditional? double condition followed by another condition. penahuse 25 8,301 Jun-01-2020, 06:00 PM
Last Post: penahuse
  Condition check differences and how to organise code? adam2020 4 2,740 May-12-2019, 04:12 PM
Last Post: Yoriz
  looking for a multi item container Skaperen 2 2,113 Apr-15-2019, 04:06 AM
Last Post: Skaperen
  check how many times an item appears in list davidm 8 5,107 Dec-29-2018, 07:49 PM
Last Post: davidm

Forum Jump:

User Panel Messages

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