input_str=str(input("enter a word : " ))
if "r"or"R" in input_str:
print(input_str,"in red team")
else:
print("no red team")
but i was getting "in red team for all input"
Then I tried the below code.
input_str=str(input("enter a word : " ))
if "r" in input_str or "R" in input_str:
print(input_str,"in red team")
else:
print("no red team")
I am getting the correct output why is that???
Aucun commentaire:
Enregistrer un commentaire