Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if condition python with index

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #condition #python #index
ADD COMMENT
Topic
Name
6+1 =