How to use "AND" "OR" in Python's input function?

This is error why? A = input("Enter 1 neighbouring planet of earth") if A =="Venus" or "Mars": print ("Congratulations you are right") else: print("Sorry you are wrong")

9/29/2019 3:16:43 AM

Madan Timilsina

3 Answers

New Answer


if A =="Venus" or A=="Mars":


There’s a correction in if statement:- if A==“Venus” or A==“Mars”:


Really? I’ve ran this program successfully...