即使我正在为其分配值,我的结果变量仍未使用,可以告诉为什么“结果”未使用
def caught_speeding(speed, is_birthday):
if speed in range(0, 61):
result = 0
elif speed in range(61, 81):
if is_birthday == True:
result = 0
else:
result = 1
elif speed >= 81:
if is_birthday == True:
result = 0
else:
result = 2
else:
result = None
caught_speeding(60, False)
caught_speeding(65, False)
caught_speeding(65, True)
答案 0 :(得分:0)
修改以返回结果:
os.system('C:/mybackup/imageautomation/Etl.PrepareAttachments.exe')
'''I want the above exe to run and after completion close itself and
then run the exe in the below command'''
os.system('C:/mybackup/imageautomation/Etl.UploadAttachments.exe')