def trafficlight(label):
if label == "tl0":
pass
elif label == "tl1":
print("STOP")
def person(label):
if label == "pr0":
pass
elif label == "pr1":
print("STOP")
label = "tl1"
if label == "tl0" or "tl1":
trafficlight(label)
elif label == "pr0" or "pr1":
person(label)
else:
print("Keep Moving")
This is my code, there will be more elif but when I checked before continuing, I noticed that I cannot get any output if I write label other than "tl1". No STOP text for "pr1" or no other outputs for other things. Can you help me? Thanks in advance.
Btw, I wanted to create simple autonomous car's decision tree, if there is any easiest way, I'm open for help.