# Program1: Take two numbers as input from User and print which one is greater or are they equal.
num1 = input("Enter the first number: ")
num2 = input("Enter the second number: ")
if num1 is num2:
print("The two numbers are equal")
elif num1 < num2:
print("The first number is less than the second number")
else:
print("The first number is greater than the second number")
输入第一个数字:-10 输入第二个数字:-20 第一个数字小于第二个数字
进程已完成,退出代码为 0
上面比较两个数字的代码有什么问题? python 为什么缺少基本的数字比较?