Skip to content

learndataa

Imagine data to solve problems

  • Home
  • YouTube Courses
  • Udemy Courses
  • Training
  • About
  • Privacy Policy
  • Facebook
  • Twitter
  • Instagram
  • Pinterest
  • Home
  • YouTube Courses
  • Udemy Courses
  • Training
  • About
  • Privacy Policy
  • Facebook
  • Twitter
  • Instagram
  • Pinterest

Remove / delete an item from a list by value

20 August 2020

Code

# Create a list
x = ['panda', 'bear', 'salmon']

# Using .remove()
x.remove('salmon')

# Output
print(x)
print(type(x))
['panda', 'bear']
<class 'list'>






Any errors in code above?
Please send a message.

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Home
  • YouTube Courses
  • Udemy Courses
  • Training
  • About
  • Privacy Policy
  • Facebook
  • Twitter
  • Instagram
  • Pinterest
learndataa, Website Powered by WordPress.com.
  • Subscribe Subscribed
    • learndataa
    • Already have a WordPress.com account? Log in now.
    • learndataa
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar