我有一个程序可以在运行时解析输出,将时间与给定值进行比较并打印差异,但它没有按照我的方式工作:
a = 'Time Taken for Response: 31 msec'
time_out = 75
if a.split()[4] > time_out:
print "time taken is more than given conditions"
print a.split()[4]
输出如下:
time taken is more than given conditions
31
我不明白为什么程序在31 < 75
任何线索或指导???