• Register
110 points
5

POP function in python

Today we will see in our website kodlogs how to use the pop function in Python as you should know that the name of the Python function works the same way.  Remove. The way they work is a little different. The function of the pop function is much easier. The pop function erases the last digit of any list. The more times you use the pop function in your list.  It will delete everything. It deletes the last digit. And it also shows what to delete. It searches in its list whether it is an element or not even after deleting everything.  If you use the pop function, it gives an error at the end. Let's look at it in detail. Let's do some practical examples. Let's look at some examples.

Syntax:

list.pop(index)

Example 

>>>list=['k','o','d','l','o','g','s']
>>>list.pop( )
's'
['k','o','d','l','o','g']

 

110 points
5