Python Forum
How to do this kind of IF STATEMENT?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to do this kind of IF STATEMENT?
#1
How to do this kind of IF STATEMENT?
p1=1
p2=0
p3=0
p4=0
pins=[p1,p2,p3,p4]
for i in pins:
    if (pins has value==1)
        print("true")
        
    else:
        print("none")
   
Reply


Messages In This Thread
How to do this kind of IF STATEMENT? - by glennford49 - Jun-16-2020, 10:54 AM
RE: How to do this kind of IF STATEMENT? - by buran - Jun-16-2020, 12:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What kind of list is this? jesse68 2 1,178 Jun-29-2022, 05:02 PM
Last Post: rob101
  splitting lines, need to add element of same kind tester_V 6 3,209 Feb-20-2021, 11:51 PM
Last Post: tester_V
  What kind of object is this? Moris526 5 2,577 Dec-27-2020, 06:41 AM
Last Post: Gribouillis
  How to write a code to get this kind of output in IDLE kavindu 5 3,614 Oct-28-2018, 07:46 PM
Last Post: wavic
  Newbie question for a kind of rolling average of list of lits zydjohn 3 3,370 Dec-16-2017, 11:41 PM
Last Post: ezdev
  Compiler fault or some kind of weird referencing bug? Joseph_f2 11 9,255 May-09-2017, 08:50 PM
Last Post: volcano63

Forum Jump:

User Panel Messages

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