Yo escribi esto:
Código:
y me tira este error:edades=[12,21,28,16,19,25,15] indice=0 for elemento in edades: if elemento<18: del(elemento[indice]) else: indice=indice+1 print edades
Status: 500 Internal Server Error Content-Type: text/html; charset=utf-8 Cache-Control: no-cache Expires: Fri, 01 Jan 1990 00:00:00 GMT Content-Length: 441
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 703, in __call__
handler.post(*groups)
File "/base/data/home/apps/pythonya/1.339838402016280589/pythonya.py", line 48, in post
exec(compile(x,'xx.py','exec'))
File "xx.py", line 7, in <module>
TypeError: 'int' object does not support item deletion