+ 2
Mofetoluwa Balogun ,
I assume you're trying to remove the second instance of 2 without using pop(), because maybe you don't know the index in some hypothetical scenario.
I thought of something. It won't work on a list with three 2s though.
https://code.sololearn.com/cr4b3uslvWjp/?ref=app
+ 7
The print is calling for the sum of the list before it was altered.
The alteration has created a new object with a different ID.
The original ID is referenced by the last line of code.
Refer to attached code for details
https://code.sololearn.com/ctHZ7jTTfS5E/?ref=app
+ 1
Mofetoluwa Balogun ,
Cool. 😎
0
Input is not take in C language