+ 5

What is the output of this code? #Question declined due to community downvotes.

What is the output of this code? A = [1,5,5,5,3] for elem in A: if elem == 5: A.remove(5) print (elem)

28th Mar 2017, 5:00 PM
Javier I. Rivera R.
Javier I. Rivera R. - avatar
3 odpowiedzi
+ 4
Sorry forgot to place the options.. * [1, 5, 3] * [1, 3] * [1, 5, 5] * Error
28th Mar 2017, 5:07 PM
Javier I. Rivera R.
Javier I. Rivera R. - avatar
+ 1
Thanks @Caleb Jore
28th Mar 2017, 5:17 PM
Javier I. Rivera R.
Javier I. Rivera R. - avatar
0
la salida seria 5 5 los elementos que remueve y que entran en el if.
29th Mar 2017, 2:10 PM
Eislen Yeraldin Puentes Barreto
Eislen Yeraldin Puentes Barreto - avatar