+ 1
Why it delete the last element of list?
>>> lst=[1,2,3,4,5,6,7,8,9] >>> lst.pop() >>> print(lst) [1,2,3,4,5,6,7,8]
7 ответов
+ 4
Pop() without any parameter(index) will remove last element from the list...
+ 4
Samba
Yes
+ 2
With no parameter, it default is to delete last one
+ 2
If you call pop without arguments it deletes an item at index -1 by default.
+ 1
Pop() is used to delete the elements
If u use without index it will automatically delete last element in the list
0
Pop method property is to eliminate last element.