我有一个程序在运行时解析输出,比较从给定值的时间和打印差异,但它不按我的方式工作:
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]
Run Code Online (Sandbox Code Playgroud)
输出如下:
time taken is more than given conditions
31
Run Code Online (Sandbox Code Playgroud)
我不明白为什么程序进入循环本身时 31 < 75
任何线索或指导???
| 归档时间: |
|
| 查看次数: |
78 次 |
| 最近记录: |