fork download
  1. def inverter(lista, first=0, last=-1):
  2. if first >= len(lista) / 2:
  3. return
  4. lista[first], lista[last] = lista[last], lista[first]
  5. inverter(lista, first + 1, last - 1)
  6.  
  7. lista = list(range(3000))
  8. inverter(lista)
  9.  
Runtime error #stdin #stdout #stderr 0.12s 24648KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 8, in <module>
  File "./prog.py", line 5, in inverter
  File "./prog.py", line 5, in inverter
  File "./prog.py", line 5, in inverter
  [Previous line repeated 995 more times]
  File "./prog.py", line 2, in inverter
RecursionError: maximum recursion depth exceeded while calling a Python object