fork download
  1. list = [1,2,3,4,7,8,10,3,2,1,5,7,8,9,10,11,10,3,2,1,5,55,67,78,89,66,67,50,40,30]
  2. result = []
  3.  
  4. for index in range(1,len(list-1)):
  5.  
  6.  
  7. if bigThanNext(list[index-1],list[index]):
  8. print(index)
  9.  
  10.  
  11.  
  12.  
  13. def bigThanNext(item,nextitem):
  14. sub = item-nextitem
  15. if item>=0:
  16. return true
  17. return false
  18.  
Runtime error #stdin #stdout #stderr 0.02s 119552KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 4, in <module>
    for index in range(1,len(list-1)):
TypeError: unsupported operand type(s) for -: 'list' and 'int'