fork(1) download
  1. def inverter(lista):
  2. if not lista: # lista vazia, retorna ela mesma
  3. return lista
  4. return lista[-1:] + inverter(lista[:-1])
  5.  
  6. # inverter lista com 3000 números
  7. lista = inverter(list(range(3000)))
  8.  
Runtime error #stdin #stdout #stderr 0.16s 44128KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 7, in <module>
  File "./prog.py", line 4, in inverter
  File "./prog.py", line 4, in inverter
  File "./prog.py", line 4, in inverter
  [Previous line repeated 996 more times]
RecursionError: maximum recursion depth exceeded