Python Lists — Remove the first item in a list

Scriptopia
Dec 10, 2022

--

Here we are creating a Python script that will remove the first item within an existing list. This is being done using the built-in ‘pop()’ function which removes the item and returns it.

In this example the first item is being removed although the index of the item can be changed to delete the n’th item in the list. Read more about this here.

Also be sure to check out our YouTube channel for daily programming content.

https://scriptopia.co.uk/2022/12/10/python-lists-remove-the-first-item-in-a-list/

--

--

Scriptopia

Programming - Projects - Source Code available for everything - Scriptopia.co.uk