Python input()
function will by default take any input that you give and store it as a string.
why does the value for b have to have the quotes around it
Well, it doesn't have to have quotes. But if you need the condition to evaluate to True, then you need quotes. So, since a
is a string, you need to have b = '10'
with the quotation mark if you need a == b
to evaluate to True.
If your input is an integer, you could also do a = int(input())
and in this case, b=10
would work as well. Simple !
So, the following two can be considered to be equivalent in terms of the result they give -
a = input()
b = '10'
if a == b:
print("Yes")
else:
print("No")
AND
a = int(input())
b = 10
if a == b:
print("Yes")
else:
print("No")