I have given number of tress, i need to find number of tress will affected by wind subjected to condition if heigth of tress to its left are smaller.
I mean I have input as l= 4 2 5 1 3 7 6
my output=3 namely 4,5,3
my sample code
l=[]
l=int(input('enter list 1:'))
for i in l:
if l[i]> l[i-1]:
print(i)
I have to find number of tress will be affected by wind if entries in list are assumed tress height.
I am new to programming, what will be good approach to this problem. Please help, thanks.