{"id":73400,"date":"2022-06-22T15:24:04","date_gmt":"2022-06-22T09:54:04","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/"},"modified":"2025-06-12T04:34:53","modified_gmt":"2025-06-11T23:04:53","slug":"remove-item-from-list-python","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/","title":{"rendered":"How to Remove an Item from a List in Python"},"content":{"rendered":"\n<p>A Python list is a changeable sequence, so you can add or remove elements after you create it. You can remove specific items or items at certain positions. It helps you keep your lists clean and organized.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-a-python-list\">What is a Python List?<\/h2>\n\n\n\n<p>A <strong>Python list<\/strong> is an ordered, changeable collection of items enclosed in square brackets, like <code>[1, 2, 3]<\/code>. You can store different data types in a single list. You can modify lists after you create them, which includes adding, changing, or removing items.<\/p>\n\n\n\n    <div class=\"courses-cta-container\">\n        <div class=\"courses-cta-card\">\n            <div class=\"courses-cta-header\">\n                <div class=\"courses-learn-icon\"><\/div>\n                <span class=\"courses-learn-text\">Academy Pro<\/span>\n            <\/div>\n            <p class=\"courses-cta-title\">\n                <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/master-python-programming\" class=\"courses-cta-title-link\">Python Programming Course<\/a>\n            <\/p>\n            <p class=\"courses-cta-description\">In this course, you will learn the fundamentals of Python: from basic syntax to mastering data structures, loops, and functions. You will also explore OOP concepts and objects to build robust programs.<\/p>\n            <div class=\"courses-cta-stats\">\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-user-icon\"><\/div>\n                    <span>11.5 Hrs<\/span>\n                <\/div>\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-star-icon\"><\/div>\n                    <span>51 Coding Exercises<\/span>\n                <\/div>\n            <\/div>\n            <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/master-python-programming\" class=\"courses-cta-button\">\n                Start Free Trial\n                <div class=\"courses-arrow-icon\"><\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4-main-ways-to-remove-an-item-from-a-python-list\">4 Main Ways to Remove an Item from a Python List<\/h2>\n\n\n\n<p>You can remove items from a Python list in several ways:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Using <code>remove()<\/code>: Remove a specific item by its value.<\/li>\n\n\n\n<li>Using <code>pop()<\/code>: Remove an item by its index, or the last item.<\/li>\n\n\n\n<li>Using <code>del<\/code> keyword: Remove an item by its index or a slice.<\/li>\n\n\n\n<li>Using <code>clear()<\/code>: Remove all items from the list.<\/li>\n<\/ul>\n\n\n\n<p>Let\u2019s look at each one.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-using-remove\">1. Using <code>remove()<\/code><\/h3>\n\n\n\n<p>The <code>remove()<\/code> method takes the value of the item you want to remove. It removes the first occurrence of that value in the list.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Syntax:<\/strong> <code>my_list.remove(value)<\/code><\/li>\n\n\n\n<li><strong>What it does:<\/strong> Removes the first item that matches <code>value<\/code>.<\/li>\n\n\n\n<li><strong>When to use:<\/strong> When you know the item's value and want to remove it.<\/li>\n<\/ul>\n\n\n\n<p>Here is an example:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# Create a list of fruits\nfruits = &#x5B;&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;, &quot;banana&quot;]\n\n# Remove the first &quot;banana&quot;\nfruits.remove(&quot;banana&quot;)\nprint(fruits)\n<\/pre><\/div>\n\n\n<p>This code outputs:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;&#039;apple&#039;, &#039;cherry&#039;, &#039;banana&#039;]\n<\/pre><\/div>\n\n\n<p>Notice that only the first \"banana\" was removed. If the item is not in the list, <code>remove()<\/code> will raise a <code>ValueError<\/code>. You can prevent this error by checking if the item exists first:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nmy_numbers = &#x5B;10, 20, 30]\n\n# Try to remove an item that does not exist (will cause an error)\n# my_numbers.remove(40) # This would raise a ValueError\n\n# Safely remove an item\nif 40 in my_numbers:\n    my_numbers.remove(40)\nelse:\n    print(&quot;40 is not in the list.&quot;)\n\nprint(my_numbers)\n<\/pre><\/div>\n\n\n<p>This code outputs:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n40 is not in the list.\n&#x5B;10, 20, 30]\n<\/pre><\/div>\n\n\n<p>This check prevents your program from crashing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-using-pop\">2. Using <code>pop()<\/code><\/h3>\n\n\n\n<p>The <code>pop()<\/code> method removes an item at a specific index. If you do not provide an index, <code>pop()<\/code> removes and returns the last item in the list.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Syntax (with index):<\/strong> <code>my_list.pop(index)<\/code><\/li>\n\n\n\n<li><strong>Syntax (without index):<\/strong> <code>my_list.pop()<\/code><\/li>\n\n\n\n<li><strong>What it does:<\/strong> Removes the item at <code>index<\/code> (or the last item) and returns it.<\/li>\n\n\n\n<li><strong>When to use:<\/strong> When you know the item's position, or you need to remove the last item.<\/li>\n<\/ul>\n\n\n\n<p>Here are examples:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# Create a list of colors\ncolors = &#x5B;&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;, &quot;yellow&quot;]\n\n# Remove the item at index 1 (which is &quot;green&quot;)\nremoved_color = colors.pop(1)\nprint(f&quot;Removed color: {removed_color}&quot;)\nprint(colors)\n\n# Remove the last item (which is &quot;yellow&quot; after the previous pop)\nlast_item = colors.pop()\nprint(f&quot;Removed last item: {last_item}&quot;)\nprint(colors)\n<\/pre><\/div>\n\n\n<p>This code outputs:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nRemoved color: green\n&#x5B;&#039;red&#039;, &#039;blue&#039;, &#039;yellow&#039;]\nRemoved last item: yellow\n&#x5B;&#039;red&#039;, &#039;blue&#039;]\n<\/pre><\/div>\n\n\n<p>If you try to <code>pop()<\/code> from an empty list or use an invalid index, it will raise an <code>IndexError<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-using-del-keyword\">3. Using <code>del<\/code> Keyword<\/h3>\n\n\n\n<p>The <code>del<\/code> keyword is a Python statement, not a list method. It allows you to delete items from a list by index or even delete slices (multiple items) or the entire list.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Syntax (single item):<\/strong> <code>del my_list[index]<\/code><\/li>\n\n\n\n<li><strong>Syntax (slice):<\/strong> <code>del my_list[start:end]<\/code><\/li>\n\n\n\n<li><strong>Syntax (entire list):<\/strong> <code>del my_list<\/code><\/li>\n\n\n\n<li><strong>What it does:<\/strong> Removes item(s) at specified index\/slice, or deletes the list variable itself.<\/li>\n\n\n\n<li><strong>When to use:<\/strong> When you know the item's position, need to remove multiple items, or delete the list variable.<\/li>\n<\/ul>\n\n\n\n<p>Here are examples:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# Create a list of numbers\nnumbers = &#x5B;10, 20, 30, 40, 50]\n\n# Delete the item at index 2 (which is 30)\ndel numbers&#x5B;2]\nprint(numbers)\n\n# Delete a slice (items from index 0 up to, but not including, index 2)\nnumbers_slice = &#x5B;1, 2, 3, 4, 5, 6]\ndel numbers_slice&#x5B;0:2] # Removes 1 and 2\nprint(numbers_slice)\n\n# Delete the entire list variable\nmy_data = &#x5B;&quot;A&quot;, &quot;B&quot;, &quot;C&quot;]\ndel my_data\n# print(my_data) # This would now raise a NameError because my_data no longer exists\n<\/pre><\/div>\n\n\n<p>This code outputs for the first two parts:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;10, 20, 40, 50]\n&#x5B;3, 4, 5, 6]\n<\/pre><\/div>\n\n\n<p>When you use <code>del my_data<\/code>, the variable <code>my_data<\/code> is completely removed from your program's memory. If you try to use it afterward, you will get a <code>NameError<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-using-clear\">4. Using <code>clear()<\/code><\/h3>\n\n\n\n<p>The <code>clear()<\/code> method removes all items from a list. It makes the list empty, but the list object itself still exists.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Syntax:<\/strong> <code>my_list.clear()<\/code><\/li>\n\n\n\n<li><strong>What it does:<\/strong> Empties the list.<\/li>\n\n\n\n<li><strong>When to use:<\/strong> When you want to remove all contents but keep the list structure.<\/li>\n<\/ul>\n\n\n\n<p>Here is an example:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n# Create a list of tasks\ntasks = &#x5B;&quot;buy groceries&quot;, &quot;pay bills&quot;, &quot;walk dog&quot;]\n\n# Clear all items from the list\ntasks.clear()\nprint(tasks)\n<\/pre><\/div>\n\n\n<p>This code outputs:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;]\n<\/pre><\/div>\n\n\n<p>The list <code>tasks<\/code> is now empty. It is different from <code>del tasks<\/code>, which would remove the <code>tasks<\/code> variable entirely.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"best-practices-for-removing-list-items\">Best Practices for Removing List Items<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"choose-the-right-method\">Choose the Right Method:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <code>remove()<\/code> when you know the value of the item.<\/li>\n\n\n\n<li>Use <code>pop(index)<\/code> when you know the position (index) of the item.<\/li>\n\n\n\n<li>Use <code>pop()<\/code> without an index to process items from the end of the list (e.g., for stacks).<\/li>\n\n\n\n<li>Use <code>del<\/code> for specific index removal or for removing slices.<\/li>\n\n\n\n<li>Use <code>clear()<\/code> when you need to empty the entire list but keep the list variable.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Handle Errors:<\/strong> Always check for <code>ValueError<\/code> when using <code>remove()<\/code> and <code>IndexError<\/code> when using <code>pop()<\/code> with an index or <code>del<\/code> with an invalid index.<\/li>\n\n\n\n<li><strong>Be Aware of Side Effects:<\/strong> Removing items changes the list in place. This can affect loops or other parts of your code that rely on the list's length or item positions.<\/li>\n<\/ul>\n\n\n\n<p>Knowing when to use <code>remove()<\/code>, <code>pop()<\/code>, or <code>clear()<\/code> depends on the type of data problem you are trying to solve. For beginners, the most important thing is to understand the underlying logic that makes these tools work. To ensure you have a rock-solid foundation in the basics from variables to loops we recommend trying our Free Python Course. It provides the perfect roadmap for anyone new to the language to become a confident coder at their own pace.<\/p>\n\n\n\n\n    <div class=\"courses-cta-container\">\n        <div class=\"courses-cta-card\">\n            <div class=\"courses-cta-header\">\n                <div class=\"courses-learn-icon\"><\/div>\n                <span class=\"courses-learn-text\">Free Course<\/span>\n            <\/div>\n            <p class=\"courses-cta-title\">\n                <a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/python-fundamentals-for-beginners\" class=\"courses-cta-title-link\">Python Fundamentals for Beginners Free Course<\/a>\n            <\/p>\n            <p class=\"courses-cta-description\">Master Python basics, from variables to data structures and control flow. Solve real-time problems and build practical skills using Jupyter Notebook.<\/p>\n            <div class=\"courses-cta-stats\">\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-user-icon\"><\/div>\n                    <span>13.5 hrs<\/span>\n                <\/div>\n                <div class=\"courses-stat-item\">\n                    <div class=\"courses-stat-icon courses-star-icon\"><\/div>\n                    <span>4.55<\/span>\n                <\/div>\n            <\/div>\n            <a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/python-fundamentals-for-beginners\" class=\"courses-cta-button\">\n                Enroll for Free\n                <div class=\"courses-arrow-icon\"><\/div>\n            <\/a>\n        <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>A Python list is a changeable sequence, so you can add or remove elements after you create it. You can remove specific items or items at certain positions. It helps you keep your lists clean and organized. What is a Python List? A Python list is an ordered, changeable collection of items enclosed in square [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":73945,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25860],"tags":[36796],"content_type":[],"class_list":["post-73400","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-python"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Remove an Item from a List in Python<\/title>\n<meta name=\"description\" content=\"Lists are collections of elements that are ordered. Let us understand how we can Remove Item From List Python.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Remove an Item from a List in Python\" \/>\n<meta property=\"og:description\" content=\"Lists are collections of elements that are ordered. Let us understand how we can Remove Item From List Python.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-22T09:54:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-11T23:04:53+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1254\" \/>\n\t<meta property=\"og:image:height\" content=\"836\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"How to Remove an Item from a List in Python\",\"datePublished\":\"2022-06-22T09:54:04+00:00\",\"dateModified\":\"2025-06-11T23:04:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/\"},\"wordCount\":719,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/iStock-805183646.jpg\",\"keywords\":[\"python\"],\"articleSection\":[\"IT\\\/Software Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/\",\"name\":\"How to Remove an Item from a List in Python\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/iStock-805183646.jpg\",\"datePublished\":\"2022-06-22T09:54:04+00:00\",\"dateModified\":\"2025-06-11T23:04:53+00:00\",\"description\":\"Lists are collections of elements that are ordered. Let us understand how we can Remove Item From List Python.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/iStock-805183646.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/iStock-805183646.jpg\",\"width\":1254,\"height\":836,\"caption\":\"Remove Item From List Python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/remove-item-from-list-python\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IT\\\/Software Development\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/software\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Remove an Item from a List in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Remove an Item from a List in Python","description":"Lists are collections of elements that are ordered. Let us understand how we can Remove Item From List Python.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/","og_locale":"en_US","og_type":"article","og_title":"How to Remove an Item from a List in Python","og_description":"Lists are collections of elements that are ordered. Let us understand how we can Remove Item From List Python.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2022-06-22T09:54:04+00:00","article_modified_time":"2025-06-11T23:04:53+00:00","og_image":[{"width":1254,"height":836,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"How to Remove an Item from a List in Python","datePublished":"2022-06-22T09:54:04+00:00","dateModified":"2025-06-11T23:04:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/"},"wordCount":719,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646.jpg","keywords":["python"],"articleSection":["IT\/Software Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/","url":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/","name":"How to Remove an Item from a List in Python","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646.jpg","datePublished":"2022-06-22T09:54:04+00:00","dateModified":"2025-06-11T23:04:53+00:00","description":"Lists are collections of elements that are ordered. Let us understand how we can Remove Item From List Python.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646.jpg","width":1254,"height":836,"caption":"Remove Item From List Python"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/remove-item-from-list-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"IT\/Software Development","item":"https:\/\/www.mygreatlearning.com\/blog\/software\/"},{"@type":"ListItem","position":3,"name":"How to Remove an Item from a List in Python"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646.jpg",1254,836,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646-300x200.jpg",300,200,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646-768x512.jpg",768,512,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646-1024x683.jpg",1024,683,true],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646.jpg",1254,836,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646.jpg",1254,836,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646-640x836.jpg",640,836,true],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646-96x96.jpg",96,96,true],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/iStock-805183646-150x100.jpg",150,100,true]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"A Python list is a changeable sequence, so you can add or remove elements after you create it. You can remove specific items or items at certain positions. It helps you keep your lists clean and organized. What is a Python List? A Python list is an ordered, changeable collection of items enclosed in square&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/73400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=73400"}],"version-history":[{"count":19,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/73400\/revisions"}],"predecessor-version":[{"id":116957,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/73400\/revisions\/116957"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/73945"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=73400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=73400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=73400"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=73400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}