{"id":5260,"date":"2019-05-11T15:40:26","date_gmt":"2019-05-11T10:10:26","guid":{"rendered":"https:\/\/www.csestack.org\/?p=5260"},"modified":"2020-04-19T09:15:29","modified_gmt":"2020-04-19T03:45:29","slug":"difference-between-sort-sorted-python-list-performance","status":"publish","type":"post","link":"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/","title":{"rendered":"Difference between Sort and Sorted in Python List by Performance"},"content":{"rendered":"<p>Sort() and sorted() are two different functions. In fact, the sort() is a list method whereas sorted() is a built-in function.<\/p>\n<p>Even both sort() and sorted() sorts the elements in the list, they are different.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69fd5b977c6a6\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #000000;color:#000000\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #000000;color:#000000\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69fd5b977c6a6\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/#How_to_sort_a_Python_List\" >How to sort a Python List?<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/#Example_Using_Sorted_Built-In_Function\" >Example: Using Sorted() Built-In Function<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/#Example_Using_sort_Python_List_Method\" >Example: Using sort() Python List Method:<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/#What_is_the_difference_between_sort_and_sorted_in_Python_List\" >What is the difference between sort and sorted in Python List?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/#Sort_vs_Sorted_Performance\" >Sort vs Sorted Performance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/#Which_one_to_use\" >Which one to use?<\/a><\/li><\/ul><\/nav><\/div>\n<h3 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"How_to_sort_a_Python_List\"><\/span>How to sort a Python List?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Let&#8217;s take an example of the list where all the elements are of <a href=\"https:\/\/www.csestack.org\/python-numeric-data-types-examples\/#int\">integer data types<\/a>. We are sorting the given list in both ways.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"Example_Using_Sorted_Built-In_Function\"><\/span>Example: Using Sorted() Built-In Function<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>&gt;&gt; listObj=[34,17,56]\n&gt;&gt; sorted(listObj)\n[17, 34, 56]\n&gt;&gt; listObj\n[34, 17, 56]<\/pre>\n<p>By default, it will sort the elements in ascending order.<\/p>\n<p><strong>How to sort the list in descending order using sorted() function?<\/strong><\/p>\n<p>You have to pass &#8220;True&#8221; to the second parameter &#8220;reverse&#8221; of the sorted() function.<\/p>\n<pre>&gt;&gt; listObj=[34,17,56]\n&gt;&gt; sorted(listObj, reverse=True)\n[56, 34, 17]<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"Example_Using_sort_Python_List_Method\"><\/span>Example: Using sort() Python List Method:<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre>&gt;&gt; listObj=[34,17,56]\n&gt;&gt; listObj.sort()\n&gt;&gt; listObj\n[17, 34, 56]<\/pre>\n<p>Method sort() also sort the list in ascending order by default.<\/p>\n<p><strong>How to sort the list in descending order using sort() method?<\/strong><\/p>\n<p>As we have seen in sorted() function,\u00a0 pass &#8220;True&#8221; to the second parameter &#8220;reverse&#8221; of the sorted() function.<\/p>\n<pre>&gt;&gt; listObj=[34,17,56]\n&gt;&gt; sort(listObj, reverse=True)\n&gt;&gt; listObj\n[56, 34, 17]<\/pre>\n<h3 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"What_is_the_difference_between_sort_and_sorted_in_Python_List\"><\/span>What is the difference between sort and sorted in Python List?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Listing one by one.<\/p>\n<ul>\n<li>The sorted() is a built-in function whereas sort() is a Python list method.<\/li>\n<li>The sorted() takes the list as an argument. The sort() is the method of a list object.<\/li>\n<li>\u00a0The sorted() returns the new sorted list whereas sort() method does not return anything. (In the above examples you can see this difference.)<\/li>\n<li>Unlike sorted() function, the sort() method sort the elements of the original list.<\/li>\n<\/ul>\n<p>I hope the given examples will give a clear idea.<\/p>\n<h3 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Sort_vs_Sorted_Performance\"><\/span>Sort vs Sorted Performance<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Which one is better by performance?<\/p>\n<p>Let&#8217;s find it out.<\/p>\n<p>Creating a list of 1000000 integers selected randomly.<\/p>\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">import time\nimport random\n \nlistObj=[]\nfor i in range(1000000):\n  listObj.append(random.randint(1,1000))\n \nlistObj2 = listObj\n\n#sorting list using sorted() built-in function\nst = time.time()\nsorted(listObj)\nprint(\"Time taken by sorted(): %s seconds\" % (time.time() - st))\n\n#sorting list using using list sort() method\nst = time.time()\nlistObj2.sort()\nprint(\"Time taken by sort(): %s seconds\" % (time.time() - st))<\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<p>Case 1:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Time taken by sorted(): 0.4520258903503418 seconds\nTime taken by sort(): 0.28101587295532227 seconds<\/pre>\n\n\n\n<p>Here, sort() method is executing faster than sorted() function.<\/p>\n\n\n\n<p>Case 2:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Time taken by sorted(): 0.2960169315338135 seconds\nTime taken by sort(): 0.3980228900909424 seconds<\/pre>\n\n\n\n<p>Here, sorted() function method is executing faster than sort() function.<\/p>\n\n\n\n<p>There is also a difference in execution time in both cases. It is clear, the time taken to sort the elements depends on the elements in the list rather than which method or function you are using.<\/p>\n\n\n\n<p><strong>Note:<\/strong><\/p>\n\n\n\n<p>In the above example, we have used loop for creating a list of 1000000 elements. You can also use the <a href=\"https:\/\/www.csestack.org\/python-lambda-function-list-comprehension-map-filter-reduce\/\">list comprehension technique<\/a> to create the list.<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">import random\n\nlistObj = [random.randint(1, 1000) for i in range(1000000)]<\/pre>\n\n\n\n<p>This is the convenient way of creating list.<\/p>\n\n\n\n<p>Coming back to the main point of comparing sort() and sorted().<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Which_one_to_use\"><\/span>Which one to use?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>It purely depends on your requirements.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If you don&#8217;t require an original list in the laster part of your code, you can sort the original list. Use sort() list method.<\/li><li>If you require an optional list later part of your code, you need to create a new sorted list. Use sorted() built-in function.<\/li><\/ul>\n\n\n\n<p>If you are new to the Python programming, check out a <a href=\"https:\/\/www.csestack.org\/basic-python3-syntax-code-example\/\">complete cheat sheet of Python 3 syntax<\/a>.<\/p>\n\n\n\n<p>This is all about the main difference between sort and sorted in the Python list. If you have any queries, write in the comment section.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is the main difference between sort and sorted in Python list? sort() method vs sorted() function performance explained with examples.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,73],"tags":[72,164],"class_list":["post-5260","post","type-post","status-publish","format-standard","hentry","category-code","category-python","tag-python","tag-python-list"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Difference between Sort and Sorted in Python List by Performance<\/title>\n<meta name=\"description\" content=\"What is the main difference between sort and sorted in Python list? sort() method vs sorted() function performance explained with examples.\" \/>\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.csestack.org\/difference-between-sort-sorted-python-list-performance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Difference between Sort and Sorted in Python List by Performance\" \/>\n<meta property=\"og:description\" content=\"What is the main difference between sort and sorted in Python list? sort() method vs sorted() function performance explained with examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/\" \/>\n<meta property=\"og:site_name\" content=\"CSEstack\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/aniruddha.ca\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/aniruddha.ca\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-11T10:10:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-19T03:45:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.csestack.org\/wp-content\/uploads\/2024\/01\/csestack-blog.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Aniruddha Chaudhari\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ani_chaudhari\" \/>\n<meta name=\"twitter:site\" content=\"@ani_chaudhari\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aniruddha Chaudhari\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.csestack.org\\\/difference-between-sort-sorted-python-list-performance\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.csestack.org\\\/difference-between-sort-sorted-python-list-performance\\\/\"},\"author\":{\"name\":\"Aniruddha Chaudhari\",\"@id\":\"https:\\\/\\\/www.csestack.org\\\/#\\\/schema\\\/person\\\/634ef1a9c4f38b0d340c6d45fa771218\"},\"headline\":\"Difference between Sort and Sorted in Python List by Performance\",\"datePublished\":\"2019-05-11T10:10:26+00:00\",\"dateModified\":\"2020-04-19T03:45:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.csestack.org\\\/difference-between-sort-sorted-python-list-performance\\\/\"},\"wordCount\":481,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/www.csestack.org\\\/#\\\/schema\\\/person\\\/634ef1a9c4f38b0d340c6d45fa771218\"},\"keywords\":[\"Python\",\"python list\"],\"articleSection\":[\"Code\",\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.csestack.org\\\/difference-between-sort-sorted-python-list-performance\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.csestack.org\\\/difference-between-sort-sorted-python-list-performance\\\/\",\"url\":\"https:\\\/\\\/www.csestack.org\\\/difference-between-sort-sorted-python-list-performance\\\/\",\"name\":\"Difference between Sort and Sorted in Python List by Performance\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.csestack.org\\\/#website\"},\"datePublished\":\"2019-05-11T10:10:26+00:00\",\"dateModified\":\"2020-04-19T03:45:29+00:00\",\"description\":\"What is the main difference between sort and sorted in Python list? sort() method vs sorted() function performance explained with examples.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.csestack.org\\\/difference-between-sort-sorted-python-list-performance\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.csestack.org\\\/difference-between-sort-sorted-python-list-performance\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.csestack.org\\\/difference-between-sort-sorted-python-list-performance\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.csestack.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Difference between Sort and Sorted in Python List by Performance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.csestack.org\\\/#website\",\"url\":\"https:\\\/\\\/www.csestack.org\\\/\",\"name\":\"CSEstack\",\"description\":\"Computer Science &amp; Programming Portal\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.csestack.org\\\/#\\\/schema\\\/person\\\/634ef1a9c4f38b0d340c6d45fa771218\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.csestack.org\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.csestack.org\\\/#\\\/schema\\\/person\\\/634ef1a9c4f38b0d340c6d45fa771218\",\"name\":\"Aniruddha Chaudhari\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.csestack.org\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/Aniruddha-Chaudhari.jpg\",\"url\":\"https:\\\/\\\/www.csestack.org\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/Aniruddha-Chaudhari.jpg\",\"contentUrl\":\"https:\\\/\\\/www.csestack.org\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/Aniruddha-Chaudhari.jpg\",\"width\":634,\"height\":634,\"caption\":\"Aniruddha Chaudhari\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.csestack.org\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/Aniruddha-Chaudhari.jpg\"},\"description\":\"I am a Python enthusiast who loves Linux and Vim. I hold a Master of Computer Science degree from NIT Trichy and have 10 years of experience in the IT industry, focusing on the Software Development Lifecycle from Requirements Gathering, Design, Development to Deployment. I have worked at IBM, Ericsson, and NetApp, and I share my knowledge on CSEstack.org.\",\"sameAs\":[\"https:\\\/\\\/www.csestack.org\",\"https:\\\/\\\/www.facebook.com\\\/aniruddha.ca\",\"pythonwithani\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/aniruddha28\\\/\",\"https:\\\/\\\/x.com\\\/ani_chaudhari\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCw0a__B0eJsvCujkSIfLTAA\"],\"url\":\"https:\\\/\\\/www.csestack.org\\\/author\\\/anicse\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Difference between Sort and Sorted in Python List by Performance","description":"What is the main difference between sort and sorted in Python list? sort() method vs sorted() function performance explained with examples.","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.csestack.org\/difference-between-sort-sorted-python-list-performance\/","og_locale":"en_US","og_type":"article","og_title":"Difference between Sort and Sorted in Python List by Performance","og_description":"What is the main difference between sort and sorted in Python list? sort() method vs sorted() function performance explained with examples.","og_url":"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/","og_site_name":"CSEstack","article_publisher":"https:\/\/www.facebook.com\/aniruddha.ca","article_author":"https:\/\/www.facebook.com\/aniruddha.ca","article_published_time":"2019-05-11T10:10:26+00:00","article_modified_time":"2020-04-19T03:45:29+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/www.csestack.org\/wp-content\/uploads\/2024\/01\/csestack-blog.jpg","type":"image\/jpeg"}],"author":"Aniruddha Chaudhari","twitter_card":"summary_large_image","twitter_creator":"@ani_chaudhari","twitter_site":"@ani_chaudhari","twitter_misc":{"Written by":"Aniruddha Chaudhari","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/#article","isPartOf":{"@id":"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/"},"author":{"name":"Aniruddha Chaudhari","@id":"https:\/\/www.csestack.org\/#\/schema\/person\/634ef1a9c4f38b0d340c6d45fa771218"},"headline":"Difference between Sort and Sorted in Python List by Performance","datePublished":"2019-05-11T10:10:26+00:00","dateModified":"2020-04-19T03:45:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/"},"wordCount":481,"commentCount":4,"publisher":{"@id":"https:\/\/www.csestack.org\/#\/schema\/person\/634ef1a9c4f38b0d340c6d45fa771218"},"keywords":["Python","python list"],"articleSection":["Code","Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/","url":"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/","name":"Difference between Sort and Sorted in Python List by Performance","isPartOf":{"@id":"https:\/\/www.csestack.org\/#website"},"datePublished":"2019-05-11T10:10:26+00:00","dateModified":"2020-04-19T03:45:29+00:00","description":"What is the main difference between sort and sorted in Python list? sort() method vs sorted() function performance explained with examples.","breadcrumb":{"@id":"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.csestack.org\/difference-between-sort-sorted-python-list-performance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.csestack.org\/"},{"@type":"ListItem","position":2,"name":"Difference between Sort and Sorted in Python List by Performance"}]},{"@type":"WebSite","@id":"https:\/\/www.csestack.org\/#website","url":"https:\/\/www.csestack.org\/","name":"CSEstack","description":"Computer Science &amp; Programming Portal","publisher":{"@id":"https:\/\/www.csestack.org\/#\/schema\/person\/634ef1a9c4f38b0d340c6d45fa771218"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.csestack.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.csestack.org\/#\/schema\/person\/634ef1a9c4f38b0d340c6d45fa771218","name":"Aniruddha Chaudhari","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.csestack.org\/wp-content\/uploads\/2019\/03\/Aniruddha-Chaudhari.jpg","url":"https:\/\/www.csestack.org\/wp-content\/uploads\/2019\/03\/Aniruddha-Chaudhari.jpg","contentUrl":"https:\/\/www.csestack.org\/wp-content\/uploads\/2019\/03\/Aniruddha-Chaudhari.jpg","width":634,"height":634,"caption":"Aniruddha Chaudhari"},"logo":{"@id":"https:\/\/www.csestack.org\/wp-content\/uploads\/2019\/03\/Aniruddha-Chaudhari.jpg"},"description":"I am a Python enthusiast who loves Linux and Vim. I hold a Master of Computer Science degree from NIT Trichy and have 10 years of experience in the IT industry, focusing on the Software Development Lifecycle from Requirements Gathering, Design, Development to Deployment. I have worked at IBM, Ericsson, and NetApp, and I share my knowledge on CSEstack.org.","sameAs":["https:\/\/www.csestack.org","https:\/\/www.facebook.com\/aniruddha.ca","pythonwithani","https:\/\/www.linkedin.com\/in\/aniruddha28\/","https:\/\/x.com\/ani_chaudhari","https:\/\/www.youtube.com\/channel\/UCw0a__B0eJsvCujkSIfLTAA"],"url":"https:\/\/www.csestack.org\/author\/anicse\/"}]}},"_links":{"self":[{"href":"https:\/\/www.csestack.org\/wp-json\/wp\/v2\/posts\/5260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.csestack.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.csestack.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.csestack.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.csestack.org\/wp-json\/wp\/v2\/comments?post=5260"}],"version-history":[{"count":10,"href":"https:\/\/www.csestack.org\/wp-json\/wp\/v2\/posts\/5260\/revisions"}],"predecessor-version":[{"id":7099,"href":"https:\/\/www.csestack.org\/wp-json\/wp\/v2\/posts\/5260\/revisions\/7099"}],"wp:attachment":[{"href":"https:\/\/www.csestack.org\/wp-json\/wp\/v2\/media?parent=5260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.csestack.org\/wp-json\/wp\/v2\/categories?post=5260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.csestack.org\/wp-json\/wp\/v2\/tags?post=5260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}