我该如何简化这个复杂的逻辑条件?
以更短、更易读的代码为目标。
if i < 13:
linux0[j] = query_res
elif 13 <= i < 27:
linux1[j] = query_res
elif 27 <= i < 28:
linux2[j] = query_res
elif 28 <= i < 33:
linuxDnsServer1[j] = query_res
elif 33 <= i < 41:
linuxRadius[j] = query_res
elif 41 <= i < 46:
gen[j] = query_res
elif 46 <= i < 49:
cdu[j] = query_res
elif 49 <= i < 55:
avalanche[j] = query_res
elif 55 <= i < 69:
defensePro_devices[j] = query_res