+ 1
Explaination
Can anyone explain the quetion and program , I didn't get it. The answer is right as it was given by our ma'am. https://code.sololearn.com/c2O8GlUcUPG7/?ref=app
2 Answers
+ 1
As Kishalaya Saha mentioned, your program removes the odd numbers from the list (which happen to be the 0th, 2nd, 4th and 5th element).
This is my attempt on fixing your program.
https://code.sololearn.com/cuVdAyycb2YS/?ref=app
+ 3
It's not doing what the problem asked. It's collecting the odd elements from the original list. x%2!=0 means x is not divisible by 2. In other words, x is odd.