+ 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
30th Aug 2023, 4:23 PM
Rain
Rain - avatar
+ 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
13th Jul 2023, 10:59 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Mofetoluwa Balogun , Cool. 😎
30th Aug 2023, 6:04 PM
Rain
Rain - avatar
0
Input is not take in C language
14th Jul 2023, 6:43 AM
Kapil Prajapat
Kapil Prajapat - avatar