{"id":8364,"date":"2020-05-06T23:23:16","date_gmt":"2020-05-06T17:53:16","guid":{"rendered":"https:\/\/tutorials.eyehunts.com\/?p=8364"},"modified":"2021-08-25T16:38:00","modified_gmt":"2021-08-25T11:08:00","slug":"python-reverse-list-with-reverse-function-other-ways","status":"publish","type":"post","link":"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/","title":{"rendered":"Python reverse list | with reverse() function &#038; Other ways"},"content":{"rendered":"\n<p>You can reverse <a rel=\"noreferrer noopener\" href=\"https:\/\/tutorial.eyehunts.com\/\/python\/python-lists-tutorial-example\/\" target=\"_blank\">Python List<\/a> using an inbuilt reverse() function and other ways. The python reverse() function is mainly used to reverses the elements of a given list(<a href=\"https:\/\/tutorial.eyehunts.com\/\/java\/java-array-initialization-length-method-type\/\" target=\"_blank\" rel=\"noreferrer noopener\">Array<\/a>). <\/p>\n\n\n\n<p>In this tutorial, our main top will be the reverse() function.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Syntax<\/strong><\/h3>\n\n\n\n<p>doesn&#8217;t take any argument.<\/p>\n\n\n\n<pre>list.reverse()\n<\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Return Value<\/strong><\/h3>\n\n\n\n<p>It Doesn&#8217;t return any value. List elements will be updated in reversed order.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Way to reverse a list in Python<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Python reverse() function<\/li><li>Using the reversed()&nbsp;function<\/li><li>Using the slicing technique.<\/li><li>Loops:  <a href=\"https:\/\/tutorial.eyehunts.com\/\/python\/python-for-loops-tutorial-example\/\">for-loop<\/a> and <a href=\"https:\/\/tutorial.eyehunts.com\/\/python\/python-while-loop-statements\/\" target=\"_blank\" rel=\"noreferrer noopener\">while loop<\/a><\/li><\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Python reverse list Examples <\/strong><\/h2>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. reverse() function<\/strong><\/h3>\n\n\n\n<p>It will modify the original list.<\/p>\n\n\n\n<pre>list1 = [1, 4, 3, 6, 7]\n\n# Reversing List\nlist1.reverse()\n\nprint(list1)\n\n<\/pre>\n\n\n\n<p><strong>Output:<\/strong> [7, 6, 3, 4, 1]<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. reversed()&nbsp;function<\/strong><\/h3>\n\n\n\n<p>we get a reverse iterator which we use to cycle through the list.<\/p>\n\n\n\n<pre>\n# Reversing a list using reversed()\ndef revList(list):\n    return [ele for ele in reversed(list)]\n\n\nlist1 = [0, 1, 2, 3, 4, 5]\nprint(revList(list1))\n\n<\/pre>\n\n\n\n<p><strong>Output:<\/strong> [5, 4, 3, 2, 1, 0]<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Reverse a List Using Slicing Operator<\/strong><\/h3>\n\n\n\n<pre>\n# Reversing a list using slicing technique\ndef revList(lst):\n    new_lst = lst[::-1]\n    return new_lst\n\n\nlist1 = [0, 1, 2, 3, 4, 5]\nprint(revList(list1))\n\n<\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Using for loop &amp;  reversed() function <\/strong><\/h3>\n\n\n\n<pre>\n# Operating System List\nos = ['Windows', 'macOS', 'Linux']\n\n# Printing Elements in Reversed Order\nfor o in reversed(os):\n    print(o)\n\n<\/pre>\n\n\n\n<p><strong>Output: <\/strong>Linux<br>macOS<br>Windows<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Q: How to reverse an array in Python?<\/h3>\n\n\n\n<p><strong>Answer:<\/strong> You can use the reverse() function to reverse an Array element in python. Array and list are the same things as python programming.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>list.reverse()<\/code><\/pre>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Q: How to reverse a list in python using for loop?<\/h3>\n\n\n\n<p><strong>Answer:<\/strong> You can use for-loop which reverses&nbsp;a&nbsp;list&nbsp;in&nbsp;python&nbsp;without&nbsp;reverse&nbsp;function. See the below example program.<\/p>\n\n\n\n<pre>my_list = [1, 2, 3, 4, 5]  # list\nnew_list = []      # empty list\nfor item in my_list:\n    new_list.insert(0, item)  # insert items to new_list at index-position [0]\nprint(new_list)\n\n<\/pre>\n\n\n\n<p><strong>Output:<\/strong> [5, 4, 3, 2, 1]<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Reverse empty list<\/h3>\n\n\n\n<p>No error occurs and the list will be the same because of no elements in the list.<\/p>\n\n\n\n<pre>list1 = []\n\n# Reversing List\nlist1.reverse()\n\nprint(list1)\n<\/pre>\n\n\n\n<p><strong>Output:<\/strong> []<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Do comment if you knew any other method, doubts, or suggestions in the <a rel=\"noreferrer noopener\" href=\"https:\/\/en.wikipedia.org\/wiki\/Comments_section\" target=\"_blank\">comment section<\/a> on this tutorial.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Note:<\/strong><br>IDE:\u00a0<a rel=\"noreferrer noopener\" href=\"https:\/\/www.jetbrains.com\/pycharm\/\" target=\"_blank\">PyCharm<\/a>\u00a02020.1.1 (Community Edition)<br>macOS 10.15.4<br><strong>Python 3.7<\/strong><br>All<strong>\u00a0Python Examples\u00a0are in\u00a0Python\u00a03<\/strong>, so Maybe its different from python 2 or upgraded versions.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>You can reverse Python List using an inbuilt reverse() function and other ways. The python reverse() function is mainly used to reverses the elements of a given list(Array). In this tutorial, our main top will be the reverse() function. Syntax doesn&#8217;t take any argument. list.reverse() Return Value It Doesn&#8217;t return any value. List elements will&hellip;&nbsp;<a href=\"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Python reverse list | with reverse() function &#038; Other ways<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[30],"tags":[38,83,90,174],"post_series":[],"class_list":["post-8364","post","type-post","status-publish","format-standard","hentry","category-python","tag-python-function","tag-python-list","tag-python-questions","tag-python-reverse"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.1.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python reverse list | with reverse() function &amp; Other ways - EyeHunts<\/title>\n<meta name=\"description\" content=\"You can reverse Python List using an inbuilt reverse() function and other ways. Python reverse() function is used to reverses the elements...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python reverse list | with reverse() function &amp; Other ways - EyeHunts\" \/>\n<meta property=\"og:description\" content=\"You can reverse Python List using an inbuilt reverse() function and other ways. Python reverse() function is used to reverses the elements...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-06T17:53:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-25T11:08:00+00:00\" \/>\n<meta name=\"author\" content=\"Rohit\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rohit\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/\",\"url\":\"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/\",\"name\":\"Python reverse list | with reverse() function & Other ways - EyeHunts\",\"isPartOf\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/#website\"},\"datePublished\":\"2020-05-06T17:53:16+00:00\",\"dateModified\":\"2021-08-25T11:08:00+00:00\",\"author\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/69ca2cb8c13fdce0ee5b39d6175119b1\"},\"description\":\"You can reverse Python List using an inbuilt reverse() function and other ways. Python reverse() function is used to reverses the elements...\",\"breadcrumb\":{\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tutorial.eyehunts.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python reverse list | with reverse() function &#038; Other ways\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/#website\",\"url\":\"https:\/\/tutorial.eyehunts.com\/\",\"name\":\"Tutorial\",\"description\":\"By EyeHunts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tutorial.eyehunts.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/69ca2cb8c13fdce0ee5b39d6175119b1\",\"name\":\"Rohit\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/tutorial.eyehunts.com\/wp-content\/litespeed\/avatar\/2b27529b86d6dfb5336897e07c93a827.jpg?ver=1777374971\",\"contentUrl\":\"https:\/\/tutorial.eyehunts.com\/wp-content\/litespeed\/avatar\/2b27529b86d6dfb5336897e07c93a827.jpg?ver=1777374971\",\"caption\":\"Rohit\"},\"description\":\"Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology &amp; like learning technical.\",\"url\":\"https:\/\/tutorial.eyehunts.com\/author\/rohit\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python reverse list | with reverse() function & Other ways - EyeHunts","description":"You can reverse Python List using an inbuilt reverse() function and other ways. Python reverse() function is used to reverses the elements...","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:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/","og_locale":"en_US","og_type":"article","og_title":"Python reverse list | with reverse() function & Other ways - EyeHunts","og_description":"You can reverse Python List using an inbuilt reverse() function and other ways. Python reverse() function is used to reverses the elements...","og_url":"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/","og_site_name":"Tutorial","article_published_time":"2020-05-06T17:53:16+00:00","article_modified_time":"2021-08-25T11:08:00+00:00","author":"Rohit","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rohit","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/","url":"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/","name":"Python reverse list | with reverse() function & Other ways - EyeHunts","isPartOf":{"@id":"https:\/\/tutorial.eyehunts.com\/#website"},"datePublished":"2020-05-06T17:53:16+00:00","dateModified":"2021-08-25T11:08:00+00:00","author":{"@id":"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/69ca2cb8c13fdce0ee5b39d6175119b1"},"description":"You can reverse Python List using an inbuilt reverse() function and other ways. Python reverse() function is used to reverses the elements...","breadcrumb":{"@id":"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/tutorial.eyehunts.com\/python\/python-reverse-list-with-reverse-function-other-ways\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tutorial.eyehunts.com\/"},{"@type":"ListItem","position":2,"name":"Python reverse list | with reverse() function &#038; Other ways"}]},{"@type":"WebSite","@id":"https:\/\/tutorial.eyehunts.com\/#website","url":"https:\/\/tutorial.eyehunts.com\/","name":"Tutorial","description":"By EyeHunts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tutorial.eyehunts.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/69ca2cb8c13fdce0ee5b39d6175119b1","name":"Rohit","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tutorial.eyehunts.com\/#\/schema\/person\/image\/","url":"https:\/\/tutorial.eyehunts.com\/wp-content\/litespeed\/avatar\/2b27529b86d6dfb5336897e07c93a827.jpg?ver=1777374971","contentUrl":"https:\/\/tutorial.eyehunts.com\/wp-content\/litespeed\/avatar\/2b27529b86d6dfb5336897e07c93a827.jpg?ver=1777374971","caption":"Rohit"},"description":"Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology &amp; like learning technical.","url":"https:\/\/tutorial.eyehunts.com\/author\/rohit\/"}]}},"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":21644,"url":"https:\/\/tutorial.eyehunts.com\/python\/how-to-reverse-a-list-in-python-example-code\/","url_meta":{"origin":8364,"position":0},"title":"How to reverse a list in Python | Example code","author":"Rohit","date":"October 27, 2021","format":false,"excerpt":"Simply using the reverse() method can reverse a list in Python. It's a built-in function in Python. You can also use the slicing or reversed() function for it. Reversing a list in-place with the list.reverse() method Using the \u201c[::-1]\u201d list slicing to create a reversed copy Creating a reverse iterator\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"How to reverse a list in Python","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/10\/How-to-reverse-a-list-in-Python.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":17323,"url":"https:\/\/tutorial.eyehunts.com\/python\/reverse-a-list-in-python-without-reverse-function-example-code\/","url_meta":{"origin":8364,"position":1},"title":"Reverse a list in Python without reverse function | Example code","author":"Rohit","date":"August 25, 2021","format":false,"excerpt":"In Python use a for loop and swap the first and last items, the second and the one before the last item, and so on until the given list is reversed. You can also use Recursion or slice notation to reverse a list. Example reverse a list in Python without\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"Reverse a list in Python without reverse function","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/08\/Reverse-a-list-in-Python-without-reverse-function.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":18545,"url":"https:\/\/tutorial.eyehunts.com\/python\/how-to-reverse-a-list-in-python-using-for-loop-example-code\/","url_meta":{"origin":8364,"position":2},"title":"How to reverse a list in Python using for loop | Example code","author":"Rohit","date":"October 27, 2021","format":false,"excerpt":"Using the while loop or for loop and range() function is the way to reverse a list in Python using a loop. Example reverse a list in Python using for loop Simple example code of different ways to Iterate over a List in Reverse Order using for loop. Example 1:\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"How to reverse a list in Python using for loop","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/10\/How-to-reverse-a-list-in-Python-using-for-loop.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":17317,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-sorted-reverse-parameters-example-code\/","url_meta":{"origin":8364,"position":3},"title":"Python sorted reverse Parameters | Example code","author":"Rohit","date":"August 9, 2021","format":false,"excerpt":"The sorted() function sorts the list of elements in a specific order and returns it as a list. Using sorted function with reverse Parameters you can reverse the list. sorted(iterable, key=None, reverse=False) Defaults sorted reverse set to False (if not provided) Python sorted reverse Example Simple example code. You can\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"Python sorted reverse","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2021\/08\/Python-sorted-reverse.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":8568,"url":"https:\/\/tutorial.eyehunts.com\/python\/reverse-a-word-in-python-letters-in-word-and-sentences\/","url_meta":{"origin":8364,"position":4},"title":"Reverse a word in python | Letters in word and Sentences","author":"Rohit","date":"May 26, 2020","format":false,"excerpt":"It a very easy to Reverse words in a string python, you have to first Separate each word, then Reverse the word separated list, and in the last join each word with space. For all this step you needed a split(), join() , reversed() function and list data structure. Algorithm\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2020\/05\/Reverse-a-word-in-python.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2020\/05\/Reverse-a-word-in-python.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2020\/05\/Reverse-a-word-in-python.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2020\/05\/Reverse-a-word-in-python.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8351,"url":"https:\/\/tutorial.eyehunts.com\/python\/python-list-array-methods-remove-insert-pop-reverse-count-sort-append-copy\/","url_meta":{"origin":8364,"position":5},"title":"Python list (Array) methods | remove, insert, pop, reverse, count, sort, append, copy","author":"Rohit","date":"May 16, 2020","format":false,"excerpt":"Python List has built-in methods that you can use for important operations in the list data structure. Python List function is changed from time to time in different versions. The most basic and important data structure in Python is the\u00a0List. In this tutorial, you will learn about the list methods\u00a0of\u2026","rel":"","context":"In &quot;Python&quot;","block_context":{"text":"Python","link":"https:\/\/tutorial.eyehunts.com\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2020\/05\/Python-list-Array-methods-.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2020\/05\/Python-list-Array-methods-.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2020\/05\/Python-list-Array-methods-.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/tutorial.eyehunts.com\/wp-content\/uploads\/2020\/05\/Python-list-Array-methods-.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts\/8364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/comments?post=8364"}],"version-history":[{"count":1,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts\/8364\/revisions"}],"predecessor-version":[{"id":17315,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/posts\/8364\/revisions\/17315"}],"wp:attachment":[{"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/media?parent=8364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/categories?post=8364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/tags?post=8364"},{"taxonomy":"post_series","embeddable":true,"href":"https:\/\/tutorial.eyehunts.com\/wp-json\/wp\/v2\/post_series?post=8364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}