I thought when comparing a int to a string (with a numeric value) in python, it is not necessary to explicitly convert the string. But the following code taught me a lesson:
size = raw_input("a numeric value:")
a_str = 'abcdefghijklmn'
if len(a_str) > size:
print("The string is longer.")
elif len(a_str) < size:
print("The string is shorter.")
else:
print("they are equal in length.")
No matter what value I typed in, it always chose len(a_str) < size until I convert the size using int(size).