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?
#1
Hello,
I want to check if 1 item apper in 4 lists
right now this is how I do this:
if item is not None and item is not False and item not in Error_List:
    print(item)
is there an easy \ cleaner way to do this? something like:

is item not in list1 or list2 or list3 
Thanks
Reply


Messages In This Thread
Can I check multi condition for 1 item in a easy way? - by korenron - Apr-28-2022, 01:42 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,821 Nov-11-2021, 06:43 AM
Last Post: Gribouillis
  Check all input, easy way! Help pls! bntayfur 2 1,830 Jul-05-2020, 10:58 PM
Last Post: bntayfur
  else condition not called when if condition is false Sandz1286 10 5,927 Jun-05-2020, 05:01 PM
Last Post: ebolisa
  [HELP] Nested conditional? double condition followed by another condition. penahuse 25 8,118 Jun-01-2020, 06:00 PM
Last Post: penahuse
  Condition check differences and how to organise code? adam2020 4 2,700 May-12-2019, 04:12 PM
Last Post: Yoriz
  looking for a multi item container Skaperen 2 2,081 Apr-15-2019, 04:06 AM
Last Post: Skaperen
  check how many times an item appears in list davidm 8 5,042 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