📜  if condition python with index - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:34.705000             🧑  作者: Mango

代码示例1
for n in range(0, len(sign_slope)):
    if sign_slope[n] < 0 and sign_slope[n - 1] > 0:
        print sign_slope[n - 1]
    else:
        print 0