Python: Part Fourteen - Deepstash
Python: Part Fourteen

Python: Part Fourteen

1 IDEA

7 reads

Python: Part Fourteen

🚶 On a walk

Keep reading for FREE

Learning Python: Removing from a list

In todays image we can see that i am using two new keywords, remove and pop.

The best way to think about it is that pop "pop()" removes the last element from the list, or you could put a index value, so in this case in the image i have put 1, this is the second element because python starts with 0. Next we have remove and this wants to know the value you want to remove, so in this case i entered a string, and it removed it from the list.

If you was to put "name = user.remove("sam")" it would take out the value from the list and put into the variable to be used later. 

1

7 reads

1

It's time to
Read like a Pro.

Jump-start your

reading habits

, gather your

knowledge

,

remember what you read

and stay ahead of the crowd!

Save time with daily digests

No ads, all content is free

Save ideas & add your own

Get access to the mobile app

2M+ Installs

4.7 App Rating

CURATED BY

samuelbancroft

Keep reading, keep studying, the more you learn the more you change. If you are doing the Python lessons please join this discord channel https://discord.gg/kugXx9KY but please follow the rules

CURATOR'S NOTE

learning is the best this we can do to better our selves, teach each other