

{"id":123222,"date":"2023-11-02T15:04:11","date_gmt":"2023-11-02T09:34:11","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=123222"},"modified":"2024-02-28T11:30:15","modified_gmt":"2024-02-28T06:00:15","slug":"python-program-on-list-methods","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/","title":{"rendered":"Python Program on List Methods"},"content":{"rendered":"<p>In this article, we will explore four Python programs that focus on different aspects of list manipulation. These programs cover topics such as exception handling, basic list operations, sorting, and removing elements from a list. By examining these examples, readers will gain practical insights into handling lists in Python and dealing with common scenarios that arise during list operations.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Basic understanding of Python programming language.<\/li>\n<li>Familiarity with list data structure in Python.<\/li>\n<li>Knowledge of fundamental concepts such as loops, user input, exception handling, and basic operations in Python.<\/li>\n<\/ul>\n<h3>Topic Explanation<\/h3>\n<h4>Program 1: Exception Handling with Lists<\/h4>\n<p>Beyond its core functionality, Program 1 serves as a valuable lesson in writing robust and error-tolerant code. The intricacies of exception handling are further illuminated, demonstrating the importance of anticipating and gracefully managing errors during list operations. Through this, readers gain not only technical skills but also a mindset for resilient programming practices.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Define a list containing a mix of integers, strings, and floats\r\nmylist = [10, \"apple\", 25, \"banana\", 5, \"cherry\", 30, \"date\"]\r\n\r\ntry:\r\n    # Get user input for the index number\r\n    i = int(input(\"Enter Index number: \"))\r\n\r\n    # Get user input for a number (b) to perform division\r\n    b = int(input(\"Enter a number: \"))\r\n\r\n    # Try to perform integer division on the element at the specified index\r\n    result = mylist[i] \/\/ b\r\n\r\n    # Print the result of the division\r\n    print(result)\r\n\r\n# Handle the case where the user enters a non-integer value\r\nexcept ValueError:\r\n    print(\"Enter number only\")\r\n\r\n# Handle general exceptions (other than ValueError)\r\nexcept Exception:\r\n    print(\"Error in Program.....\")\r\n\r\n# Handle the case where the user provides an invalid index\r\nexcept IndexError as obj:\r\n    print(\"Invalid index number....\")\r\n\r\n# Handle the case where division by zero is attempted\r\nexcept ZeroDivisionError as obj:\r\n    print(\"Can't divide by zero....\")<\/pre>\n<div class=\"df-code-out\">\n<div class=\"df-code-out\">\n<p><strong>Input and Output:<\/strong><\/p>\n<p>Enter Index number: 10<br \/>\nEnter a number: 3<br \/>\nError in Program&#8230;..<\/p>\n<\/div>\n<h4>Code Explanation:<\/h4>\n<p>Defines a list mylist containing a mix of integers, strings, and floats<\/p>\n<p><strong>1. Uses a try block to attempt:<\/strong><\/p>\n<ul>\n<li>Get user input for an index into the list to access<\/li>\n<li>Get user input for a number b to divide the accessed element by<\/li>\n<li>Perform integer division using \/\/ on accessed element and b<\/li>\n<li>Print the division result<\/li>\n<\/ul>\n<p><strong>2. Uses except blocks to handle different exceptions:<\/strong><\/p>\n<ul>\n<li>ValueError if user enters a non-integer value for inputs<\/li>\n<li>Exception to catch general exceptions<\/li>\n<li>IndexError if user enters an invalid index into the list<\/li>\n<li>ZeroDivisionError if user enters 0 for b, attempting to divide by 0<\/li>\n<\/ul>\n<p><strong>3.<\/strong> The except blocks print custom error messages for each exception type encountered<br \/>\n<strong>4.<\/strong> This shows how to anticipate and handle different exceptions in Python using try and except blocks<\/p>\n<h4>Program 2: Basic List Operations<\/h4>\n<p>Program 2 not only provides foundational insights into list traversal and length calculation but also sets the stage for more advanced manipulations. The simplicity of basic operations becomes a stepping stone for readers to embark on a journey of increasingly complex list handling, laying a solid groundwork for subsequent programs.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Define a list containing a mix of integers, strings, and floats\r\nmylist = [10, \"apple\", 25, \"banana\", 5, \"cherry\", 30, \"date\"]\r\n\r\n# x stores length of list\r\nx = len(mylist)\r\n\r\n# Print the length of the list\r\nprint(x)\r\n\r\n# Iterate over the elements in the list using a for loop\r\nfor i in range(0, len(mylist), 1):\r\n    # Print each element with a space at the end to display them on the same line\r\n    print(mylist[i], end=\" \")<\/pre>\n<div class=\"df-code-out\"><strong>Output:<\/strong><br \/>\n8<br \/>\n10 apple 25 banana 5 cherry 30 date<\/div>\n<h4>Code Explanation:<\/h4>\n<p><strong>1.<\/strong> Defines a list mylist containing integers, strings, and floats<br \/>\n<strong>2.<\/strong> Uses the len() function to get the length of mylist and stores it in x<br \/>\n<strong>3.<\/strong> Prints out x to display the length of the list<br \/>\n<strong>4.<\/strong> Sets up a for loop to iterate through the elements in mylist:<\/p>\n<ul>\n<li>The range() function returns numbers from 0 to length of list &#8211; 1<\/li>\n<li>This number sequence will serve as the loop indexes<\/li>\n<\/ul>\n<p><strong>5. Inside the loop:<\/strong><\/p>\n<ul>\n<li>Indexes into mylist using the loop variable i to access each element<\/li>\n<li>Prints each element followed by a space to display outputs on same line<\/li>\n<\/ul>\n<p><strong>6.<\/strong> So this iterates through the list and prints all elements by accessing them via an index in the loop<\/p>\n<h4>Program 3: List Insertion, Sorting, and Reversal<\/h4>\n<p>With Program 3, the narrative of list manipulation takes a dynamic turn. The process of initializing an empty list, user-driven population, and subsequent modifications through insertion, sorting, and reversal reflects the real-world scenarios where lists are continually evolving. This program serves as a bridge between fundamental operations and advanced list manipulations.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Initialize an empty list\r\nmylist = []\r\n\r\n# Get user input for the limit of the list\r\nn = int(input(\"Enter the limit:\"))\r\n\r\n# Use a for loop to iterate 'n' times and append user inputs to the list\r\nfor i in range(n):\r\n    x = input()\r\n    mylist.append(x)\r\n\r\n# Print the list after user inputs\r\nprint(\"List after user inputs:\", mylist)\r\n\r\n# Inserting the value 600 at index 3 \r\nmylist.insert(3, 600)\r\n\r\n# Print the list after inserting 600\r\nprint(\"List after inserting 600 at index 3:\", mylist)\r\n\r\n# Print the list before sorting\r\nprint(\"Before Sorting:\")\r\nprint(mylist)\r\n\r\n# Check if the elements are of comparable types (either all strings or all integers)\r\nif all(isinstance(elem, (int, str)) for elem in mylist):\r\n    # Convert elements to integers if they are strings\r\n    mylist = [int(elem) if isinstance(elem, str) else elem for elem in mylist]\r\n\r\n    # Sorting the list \r\n    mylist.sort()\r\n\r\n    # Print the list after sorting\r\n    print(\"After Sorting:\")\r\n    print(mylist)\r\nelse:\r\n    print(\"Elements are not of comparable types.\")\r\n\r\n# Reverse the order of elements in the list\r\nmylist.reverse()\r\n\r\n# Print the list after reversing the order\r\nprint(\"After Reversing:\")\r\nprint(mylist)<\/pre>\n<div class=\"df-code-out\"><strong>Output:<\/strong><br \/>\nEnter the limit:5<br \/>\n1<br \/>\n2<br \/>\n5<br \/>\n4<br \/>\n3<br \/>\nList after user inputs: [&#8216;1&#8217;, &#8216;2&#8217;, &#8216;5&#8217;, &#8216;4&#8217;, &#8216;3&#8217;]<br \/>\nList after inserting 600 at index 3: [&#8216;1&#8217;, &#8216;2&#8217;, &#8216;5&#8217;, 600, &#8216;4&#8217;, &#8216;3&#8217;]<br \/>\nBefore Sorting:<br \/>\n[&#8216;1&#8217;, &#8216;2&#8217;, &#8216;5&#8217;, 600, &#8216;4&#8217;, &#8216;3&#8217;]<br \/>\nAfter Sorting:<br \/>\n[1, 2, 3, 4, 5, 600]<br \/>\nAfter Reversing:<br \/>\n[600, 5, 4, 3, 2, 1]<\/div>\n<h4>Code Explanation:<\/h4>\n<p><strong>1.<\/strong> Initializes empty list mylist to store user inputs<br \/>\n<strong>2.<\/strong> Gets integer user input for n, the desired limit on number of inputs<br \/>\n<strong>3. Sets up a for loop to iterate n times:<\/strong><br \/>\n<strong>I) Each iteration:<\/strong><\/p>\n<ul>\n<li>Gets next user input as string and stores in x<\/li>\n<li>Appends x to my list using .append() method<\/li>\n<\/ul>\n<p><strong>4.<\/strong> Prints current mylist showing user inputs<br \/>\n<strong>5.<\/strong> Inserts integer 600 at index 3 in the list using .insert() method<br \/>\n<strong>6.<\/strong> Prints mylist again showing inserted value 600<br \/>\n<strong>7.<\/strong> Prints message &#8220;Before Sorting&#8221;<br \/>\n<strong>8.<\/strong> Prints current unsorted mylist<br \/>\n<strong>9.<\/strong> Check if all elements in my list are comparable types:<\/p>\n<ul>\n<li>Uses all() and isinstance() to check if all are int or str<\/li>\n<\/ul>\n<p><strong>10. If all comparable types:<\/strong><\/p>\n<ul>\n<li>Converts any str elements to int using conditional list comprehension<\/li>\n<li>Sorts list in ascending order using .sort() method<\/li>\n<\/ul>\n<p><strong>11.<\/strong> Prints message &#8220;After Sorting&#8221;<br \/>\n<strong>12.<\/strong> Prints sorted version of my list<br \/>\n<strong>13.<\/strong> If not all comparable types, prints error message<br \/>\n<strong>14.<\/strong> Reverses current order of elements using .reverse()<br \/>\n<strong>15.<\/strong> Prints message &#8220;After Reversing&#8221;<br \/>\n<strong>16.<\/strong> Prints list with reversed element order<\/p>\n<h4>Program 4: List Removal Operations<\/h4>\n<p>As readers traverse the landscape of list manipulation, Program 4 becomes a crucial chapter. It not only showcases the practicality of removing elements but also draws attention to the nuances between pop() and remove(). The user-centric removal operations contribute to a holistic understanding of efficiently modifying lists based on specific needs.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Initialize an empty list\r\nmylist = []\r\n\r\n# Get user input for the limit of the list\r\nn = int(input(\"Enter the limit:\"))\r\n\r\n# Use a for loop to iterate 'n' times and append user inputs to the list\r\nfor i in range(n):\r\n    x = input()\r\n    mylist.append(x)\r\n\r\n# Print the list after user inputs\r\nprint(\"List after user inputs:\", mylist)\r\n\r\n# Remove the last element from the list using the pop() method\r\nmylist.pop()\r\n\r\n# Print the list after removing the last element\r\nprint(\"List after popping the last element:\", mylist)\r\n\r\n# Get user input for the element to be removed\r\nn = input(\"Enter element for removal: \")\r\n\r\n# Remove the specified element from the list using the remove() method\r\nmylist.remove(n)\r\n\r\n# Print the list after removing the specified element\r\nprint(\"List after removing element '{}':\".format(n), mylist)<\/pre>\n<div class=\"df-code-out\">\n<p><strong>Output:<\/strong><\/p>\n<p>Enter the limit:4<br \/>\n1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\nList after user inputs: [&#8216;1&#8217;, &#8216;2&#8217;, &#8216;3&#8217;, &#8216;4&#8217;]<br \/>\nList after popping the last element: [&#8216;1&#8217;, &#8216;2&#8217;, &#8216;3&#8217;]<br \/>\nEnter element for removal: 2<br \/>\nList after removing element &#8216;2&#8217;: [&#8216;1&#8217;, &#8216;3&#8217;]<\/p>\n<h4>Code Explanation:<\/h4>\n<ul>\n<li>Initializes an empty list mylist<\/li>\n<li>Gets user input for n, the desired limit on number of elements<\/li>\n<li>Uses a for loop to append n user inputs to mylist<\/li>\n<li>Prints mylist after taking user inputs<\/li>\n<li>Removes last element from mylist using .pop() method<\/li>\n<li>Prints mylist after removing last element<\/li>\n<li>Gets user input for element to remove in n<\/li>\n<li>Removes user-specified element n from mylist using .remove()<\/li>\n<li>Prints mylist after removing element n<\/li>\n<\/ul>\n<h3>Summary<\/h3>\n<p>This article explored four Python programs, each focusing on different aspects of list manipulation.<\/p>\n<p>Program 1 demonstrated effective exception handling during list operations, showcasing the use of try-except blocks to gracefully manage errors.<\/p>\n<p>Program 2 covered basic list operations, emphasizing list traversal and length calculation.<\/p>\n<p>Program 3 illustrated list insertion, sorting, and reversal, providing practical insights into modifying lists dynamically.<\/p>\n<p>Lastly, Program 4 demonstrated list removal operations using pop() and remove() methods.<\/p>\n<p>Overall, these examples offered valuable insights into handling common scenarios when working with lists in Python, making it a useful resource for individuals seeking practical experience in list manipulation.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will explore four Python programs that focus on different aspects of list manipulation. These programs cover topics such as exception handling, basic list operations, sorting, and removing elements from a&#46;&#46;&#46;<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[28638,28637,10333,28636,28626],"class_list":["post-123222","post","type-post","status-publish","format-standard","hentry","category-python","tag-list-methods","tag-list-methods-in-python","tag-python","tag-python-list-methods","tag-python-practical"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Program on List Methods - DataFlair<\/title>\n<meta name=\"description\" content=\"These programs cover topics such as exception handling, basic list operations, sorting, and removing elements from a list.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Program on List Methods - DataFlair\" \/>\n<meta property=\"og:description\" content=\"These programs cover topics such as exception handling, basic list operations, sorting, and removing elements from a list.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-02T09:34:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-28T06:00:15+00:00\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Program on List Methods - DataFlair","description":"These programs cover topics such as exception handling, basic list operations, sorting, and removing elements from a list.","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:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/","og_locale":"en_US","og_type":"article","og_title":"Python Program on List Methods - DataFlair","og_description":"These programs cover topics such as exception handling, basic list operations, sorting, and removing elements from a list.","og_url":"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2023-11-02T09:34:11+00:00","article_modified_time":"2024-02-28T06:00:15+00:00","author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445"},"headline":"Python Program on List Methods","datePublished":"2023-11-02T09:34:11+00:00","dateModified":"2024-02-28T06:00:15+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/"},"wordCount":952,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"keywords":["list methods","list methods in python","Python","python list methods","python practical"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/","url":"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/","name":"Python Program on List Methods - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"datePublished":"2023-11-02T09:34:11+00:00","dateModified":"2024-02-28T06:00:15+00:00","description":"These programs cover topics such as exception handling, basic list operations, sorting, and removing elements from a list.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-program-on-list-methods\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Python Program on List Methods"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam6\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/123222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=123222"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/123222\/revisions"}],"predecessor-version":[{"id":134121,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/123222\/revisions\/134121"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=123222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=123222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=123222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}