+ 1

Python, lists

Can we remove any element from a list using index number. Eg., list.pop(3) I saw we could use list.pop(0) to remove the first element.

7th Jul 2020, 4:15 PM
Some Name
Some Name - avatar
3 Answers
+ 3
Yes, as long as you pass a valid index (within bounds), it should work.
7th Jul 2020, 4:29 PM
Ipang
+ 1
Thank uu 😊
7th Jul 2020, 4:30 PM
Some Name
Some Name - avatar
+ 1
Pop method removes random element and pop() without argument is valid syntax.
9th Jul 2020, 1:33 AM
shubham kumar
shubham kumar - avatar