New course! Every coder should learn Generative AI!
Try a free lesson+ 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)
5 Answers
+ 8
Well if you're wondering why your question got downvotes, it's probably because it's a little difficult for some people. The output is three lines and it is a little misleading. Try editing it and resubmitting it. Another reason might be that someone has already sent in the same question before. The best solution is to send in as many as you can.
Happy coding!
+ 7
Well the output is really three lines and it doesn't return an array, so your question is incorrect. That's probably why it got declined.
+ 4
Sorry forgot to place the options..
* [1, 5, 3]
* [1, 3]
* [1, 5, 5]
* Error
+ 1
Thanks @Caleb Jore
0
la salida seria
5
5
los elementos que remueve y que entran en el if.