{"id":101921,"date":"2021-04-28T11:00:00","date_gmt":"2021-04-28T08:00:00","guid":{"rendered":"https:\/\/examples.javacodegeeks.com\/?p=101921"},"modified":"2021-04-21T19:35:59","modified_gmt":"2021-04-21T16:35:59","slug":"python-list-methods","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/","title":{"rendered":"Python List Methods"},"content":{"rendered":"<p>Hello in this tutorial, we will see how to implement different list methods in python programming.<\/p>\n<h2>1. Introduction<\/h2>\n<p>The <strong>list<\/strong> data structure in python programming is:<\/p>\n<ul>\n<li>A data structure that can store multiple data at once (in other words it is a comma separate items between the square brackets and the items can be of the different or same type)<\/li>\n<li>It is an ordered collection<\/li>\n<li>Each element in a list have a distinct place in the sequence and will not eradicate the duplicates<\/li>\n<li>It is mutable in nature (i.e. we can add and remove the entries<\/li>\n<\/ul>\n<p>The useful list methods in python programming are \u2013<\/p>\n<ul>\n<li><code>insert(\u2026)<\/code>: Used to insert an item to the list at a given position. Represented by the syntax as &#8211; <code>insert(position, list)<\/code><\/li>\n<li><code>append(\u2026)<\/code>: Used to insert an item at the end of the list. Represented by the syntax as &#8211; <code>append(list)<\/code><\/li>\n<li><code>remove(\u2026)<\/code>: Remove an element from the list. If the element exists it will be removed from the list otherwise <code>ValueError<\/code> will be thrown. Represented by the syntax as &#8211; <code>remove(item_to_be_removed)<\/code><\/li>\n<li><code>extend(\u2026)<\/code>: Used to merge two lists and store the results in the first list. Represented by the syntax as &#8211; <code>first_list.extend(second_list)<\/code><\/li>\n<li><code>count(\u2026)<\/code>: Used to count the number of times the given element appears in the list. Represented by the syntax as &#8211; <code>list.count(search_key)<\/code><\/li>\n<li><code>index(\u2026)<\/code>: Used to find the position of the given element in the list. If the element exists return the position value of the element in the list otherwise <code>ValueError<\/code> is thrown. Represented by the syntax as &#8211; <code>list.index(search_key)<\/code><\/li>\n<li><code>copy(\u2026)<\/code>: Used to make a copy of the original list. Represented by the syntax as &#8211; <code>original_list.copy()<\/code><\/li>\n<li><code>sort(\u2026)<\/code>: Used to sort the data of the list in ascending order. Represented by the syntax as &#8211; <code>list.sort()<\/code><\/li>\n<li><code>reverse()<\/code>: Used to reverse the items in the list. Represented by the syntax as &#8211; <code>list.reverse()<\/code><\/li>\n<li><code>clear()<\/code>: Used to remove all items from the list. Represented by the syntax as &#8211; <code>list.clear()<\/code><\/li>\n<li><code>pop()<\/code>: Used to remove an element from the given index\n<ul>\n<li>If no index value is passed the default index <code>-1<\/code> is passed to remove the last item from the list<\/li>\n<li>If an invalid index value is passed <code>IndexError<\/code> will be thrown<\/li>\n<li>The method returns the item present at the given index<\/li>\n<li>Represented by the syntax as &#8211; <code>list.pop(index_value)<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>1.2 Setting up Python<\/h3>\n<p>If someone needs to go through the Python installation on Windows, please watch <a href=\"https:\/\/www.youtube.com\/watch?v=i-MuSAwgwCU\" target=\"_blank\" rel=\"noopener\">this<\/a> link. You can download the Python from <a href=\"https:\/\/www.python.org\/downloads\/\" target=\"_blank\" rel=\"noopener\">this<\/a> link.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<h2>2. Python List Methods<\/h2>\n<p>Let us dive in with the programming stuff now. I am using <a href=\"https:\/\/www.jetbrains.com\/pycharm\/\" target=\"_blank\" rel=\"noopener\">JetBrains PyCharm<\/a> as my preferred IDE. You&#8217;re free to choose the IDE of your choice.<\/p>\n<h3>2.1 Creating an implementation file<\/h3>\n<p>Let us understand the implementation with the help of a python script.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>Implementation file<\/em><\/span><\/p>\n<pre class=\"brush:python;\"># useful methods under python list\n\n# insert element in list at a given position\ndef insert_item_to_list(items, item, position):\n    items.insert(position, item)\n    print('List after insert = {}'.format(items))\n\n\n# insert element at the end of the list\ndef append_item_to_list(items, item):\n    items.append(item)\n    print('List after append = {}'.format(items))\n\n\n# remove element from the list\ndef remove_item_from_list(items, item_to_be_removed):\n    try:\n        print('Item to be removed = {}'.format(item_to_be_removed))\n        items.remove(item_to_be_removed)\n        print('List after remove = {}'.format(items))\n    except ValueError:\n        print('Item does not exist')\n\n\n# merge two lists into one and store the merged items in first list\ndef merge_lists(list1, list2):\n    list1.extend(list2)\n    print('Updated list = {}'.format(list1))\n\n\n# count the number of times a given item appears in the list\ndef count_element(items, search_key):\n    count = items.count(search_key)\n    print('{} appear {} times'.format(search_key, count))\n\n\n# obtain the position of the item in the list\ndef find_item_pos(items, search_key):\n    try:\n        pos = items.index(search_key)\n        print('{} found at position = {}'.format(search_key, (pos + 1)))\n    except ValueError:\n        print('Item does not exist')\n\n\n# make a copy of the original list\ndef copy_list(items):\n    copied_list = items.copy()\n    print('Copied list = {}'.format(copied_list))\n\n\n# sort the list in ascending order\ndef sorted_list(items):\n    items.sort()\n    print('Sorted list = {}'.format(items))\n\n\n# reverse the items in the list\ndef reversed_list(items):\n    items.reverse()\n    print('Reversed list = {}'.format(items))\n\n\n# remove all items from the list and return an empty list\ndef clear_list(items):\n    items.clear()\n    print('List cleared')\n\n\n# remove the item from the list at a given index\ndef pop_item_from_list(items, index):\n    popped_item = items.pop(index)\n    print('Removed item = {}'.format(popped_item))\n    print('Updated list = {}'.format(items))\n\n\n# driver code\nif __name__ == '__main__':\n    phones = ['Apple', 'Android', 'Blackberry', 'Windows', 'Galaxy', 'HTC', 'LG']\n    print('Original list = {}\\n'.format(phones))\n\n    # uncomment the method to check its working. have fun\n    # insert_item_to_list(phones, 'Samsung', 3)\n    # append_item_to_list(phones, 'Xperia')\n    # remove_item_from_list(phones, 'LG')\n    # merge_lists(phones, ['Wiko', 'Nokia'])\n    # count_element(phones, 'Apple')\n    # find_item_pos(phones, 'HTC')\n    # copy_list(phones)\n    # sorted_list(phones)\n    # reversed_list(phones)\n    # pop_item_from_list(phones, 2)\n    # clear_list(phones)\n<\/pre>\n<p>You can uncomment the method of your choice and run this python script. For the demo, I have uncommented all the methods and if everything goes well the output will be shown in the IDE console.<\/p>\n<p><span style=\"text-decoration: underline;\"><em>Console output<\/em><\/span><\/p>\n<pre class=\"brush:plain;\">Original list = ['Apple', 'Android', 'Blackberry', 'Windows', 'Galaxy', 'HTC', 'LG']\n\nList after insert = ['Apple', 'Android', 'Blackberry', 'Samsung', 'Windows', 'Galaxy', 'HTC', 'LG']\nList after append = ['Apple', 'Android', 'Blackberry', 'Samsung', 'Windows', 'Galaxy', 'HTC', 'LG', 'Xperia']\nItem to be removed = LG\nList after remove = ['Apple', 'Android', 'Blackberry', 'Samsung', 'Windows', 'Galaxy', 'HTC', 'Xperia']\nUpdated list = ['Apple', 'Android', 'Blackberry', 'Samsung', 'Windows', 'Galaxy', 'HTC', 'Xperia', 'Wiko', 'Nokia']\nApple appear 1 times\nHTC found at position = 7\nCopied list = ['Apple', 'Android', 'Blackberry', 'Samsung', 'Windows', 'Galaxy', 'HTC', 'Xperia', 'Wiko', 'Nokia']\nSorted list = ['Android', 'Apple', 'Blackberry', 'Galaxy', 'HTC', 'Nokia', 'Samsung', 'Wiko', 'Windows', 'Xperia']\nReversed list = ['Xperia', 'Windows', 'Wiko', 'Samsung', 'Nokia', 'HTC', 'Galaxy', 'Blackberry', 'Apple', 'Android']\nRemoved item = Wiko\nUpdated list = ['Xperia', 'Windows', 'Samsung', 'Nokia', 'HTC', 'Galaxy', 'Blackberry', 'Apple', 'Android']\nList cleared\n<\/pre>\n<p>That is all for this tutorial and I hope the article served you with whatever you were looking for. Happy Learning and do not forget to share!<\/p>\n<h2>3. Summary<\/h2>\n<p>In this tutorial, we learned:<\/p>\n<ul>\n<li>Different list methods in the python programming<\/li>\n<li>Sample programming stuff<\/li>\n<\/ul>\n<p>You can download the source code of this tutorial from the <a href=\"#projectDownload\">Downloads<\/a> section.<\/p>\n<h2><a name=\"projectDownload\"><\/a>4. Download the Project<\/h2>\n<p>This was a tutorial to explore the different list methods in python programming.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/04\/Python-List-Methods.zip\" target=\"_blank\" rel=\"noopener\"><strong>Python List Methods<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hello in this tutorial, we will see how to implement different list methods in python programming. 1. Introduction The list data structure in python programming is: A data structure that can store multiple data at once (in other words it is a comma separate items between the square brackets and the items can be of &hellip;<\/p>\n","protected":false},"author":119,"featured_media":99891,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46689],"tags":[1716],"class_list":["post-101921","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python List Methods - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Hello in this tutorial, we will see how to implement different list methods in python programming. 1. Introduction The list data structure in 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:\/\/examples.javacodegeeks.com\/python-list-methods\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python List Methods - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Hello in this tutorial, we will see how to implement different list methods in python programming. 1. Introduction The list data structure in python\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-28T08:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Yatin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yatin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/\"},\"author\":{\"name\":\"Yatin\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/9874407a37b028e8be3276e2b5960d13\"},\"headline\":\"Python List Methods\",\"datePublished\":\"2021-04-28T08:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/\"},\"wordCount\":557,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"keywords\":[\"python\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/\",\"name\":\"Python List Methods - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"datePublished\":\"2021-04-28T08:00:00+00:00\",\"description\":\"Hello in this tutorial, we will see how to implement different list methods in python programming. 1. Introduction The list data structure in python\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"set python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/web-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/web-development\/python\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Python List Methods\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/9874407a37b028e8be3276e2b5960d13\",\"name\":\"Yatin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/cropped-Yatin-Batra_avatar_1515758148-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/cropped-Yatin-Batra_avatar_1515758148-96x96.jpg\",\"caption\":\"Yatin\"},\"description\":\"An experience full-stack engineer well versed with Core Java, Spring\/Springboot, MVC, Security, AOP, Frontend (Angular &amp; React), and cloud technologies (such as AWS, GCP, Jenkins, Docker, K8).\",\"sameAs\":[\"https:\/\/www.javacodegeeks.com\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/yatin-batra\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python List Methods - Java Code Geeks","description":"Hello in this tutorial, we will see how to implement different list methods in python programming. 1. Introduction The list data structure in 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:\/\/examples.javacodegeeks.com\/python-list-methods\/","og_locale":"en_US","og_type":"article","og_title":"Python List Methods - Java Code Geeks","og_description":"Hello in this tutorial, we will see how to implement different list methods in python programming. 1. Introduction The list data structure in python","og_url":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2021-04-28T08:00:00+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","type":"image\/jpeg"}],"author":"Yatin","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Yatin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/"},"author":{"name":"Yatin","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/9874407a37b028e8be3276e2b5960d13"},"headline":"Python List Methods","datePublished":"2021-04-28T08:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/"},"wordCount":557,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","keywords":["python"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/python-list-methods\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/","url":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/","name":"Python List Methods - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","datePublished":"2021-04-28T08:00:00+00:00","description":"Hello in this tutorial, we will see how to implement different list methods in python programming. 1. Introduction The list data structure in python","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/python-list-methods\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","width":150,"height":150,"caption":"set python"},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/python-list-methods\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Web Development","item":"https:\/\/examples.javacodegeeks.com\/category\/web-development\/"},{"@type":"ListItem","position":3,"name":"Python","item":"https:\/\/examples.javacodegeeks.com\/category\/web-development\/python\/"},{"@type":"ListItem","position":4,"name":"Python List Methods"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/9874407a37b028e8be3276e2b5960d13","name":"Yatin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/cropped-Yatin-Batra_avatar_1515758148-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2023\/09\/cropped-Yatin-Batra_avatar_1515758148-96x96.jpg","caption":"Yatin"},"description":"An experience full-stack engineer well versed with Core Java, Spring\/Springboot, MVC, Security, AOP, Frontend (Angular &amp; React), and cloud technologies (such as AWS, GCP, Jenkins, Docker, K8).","sameAs":["https:\/\/www.javacodegeeks.com"],"url":"https:\/\/examples.javacodegeeks.com\/author\/yatin-batra\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/101921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/119"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=101921"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/101921\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/99891"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=101921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=101921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=101921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}