When i was trying this:
a = input("Enter your math calculations :")
if "45*3" or "45 * 3" in a:
print("555")
elif "56+9" or "56 + 9" in a:
print("77")
elif "56/6" or "56 / 6" in a:
print("4")
else:
print(eval(a))
Instead of expected answer it is outputting unexpected output
Expected : Enter your math calculations :10+1 =
11
Result : Enter your math calculations :10+1 =
555
What am i doing wrong???.
>Solution :
Why did you write if "45*3" or "45 * 3" in a:
Instead write if a=="45*3" or a=="45 * 3":
and all like this.