{"id":3533,"date":"2023-08-04T19:49:54","date_gmt":"2023-08-04T19:49:54","guid":{"rendered":"https:\/\/www.copahost.com\/blog\/?p=3533"},"modified":"2023-08-05T16:18:17","modified_gmt":"2023-08-05T16:18:17","slug":"list-python","status":"publish","type":"post","link":"https:\/\/www.copahost.com\/blog\/list-python\/","title":{"rendered":"List in Python: functions and applicability"},"content":{"rendered":"\n<p>The Python list stores data and objects in different ways and offers a linearly organized data structure, where each piece of data has a function and is accessed through an index.<br><br>Thus, this type of list is considered as a common structure, but with additions and specific functions.<br><br>There are two reasons to work with it: Python is a frequently used language and considered one of the simplest for beginners; moreover, the use of lists is common in any type of software development, making it necessary to know all the possibilities.<br><br>In this article, you will find information about creating lists in Python and other possible applications.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_69_1 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#How_to_create_a_Python_list\" title=\"How to create a Python list?\">How to create a Python list?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Example_of_empty_list\" title=\"Example of empty list:\">Example of empty list:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Adding_elements\" title=\"Adding elements:\">Adding elements:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Accessing_list_elements_python\" title=\"Accessing list elements python\">Accessing list elements python<\/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.copahost.com\/blog\/list-python\/#Modifying_list_elements\" title=\"Modifying list elements\">Modifying list elements<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#operations_with_list_python\" title=\"operations with list python\">operations with list python<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Concatenation_in_list\" title=\"Concatenation in list\">Concatenation in list<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Repetition_in_list\" title=\"Repetition in list\">Repetition in list<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Verification_in_list\" title=\"Verification in list\">Verification in list<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Values_minimums_maximums_and_sum\" title=\"Values: minimums, maximums and sum\">Values: minimums, maximums and sum<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#scroll_list_python\" title=\"scroll list python\">scroll list python<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Python_list_methods_removing_and_sorting\" title=\"Python list methods: removing and sorting\">Python list methods: removing and sorting<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#%E2%80%98pop\" title=\"&#8216;pop()&#8217;\">&#8216;pop()&#8217;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#%E2%80%98remove\" title=\"&#8216;remove()&#8217;\">&#8216;remove()&#8217;<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Inserting_multiple_items_in_the_list\" title=\"Inserting multiple items in the list\">Inserting multiple items in the list<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Python_list_applicability\" title=\"Python list applicability\">Python list applicability<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#1_Storage_and_manipulation_of_data_collections\" title=\"1. Storage and manipulation of data collections\">1. Storage and manipulation of data collections<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#2_Iteration_and_element_processing\" title=\"2. Iteration and element processing\">2. Iteration and element processing<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#3_Implementing_stacks_and_queues\" title=\"3. Implementing stacks and queues\">3. Implementing stacks and queues<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#4_Sorting_and_sorting_data\" title=\"4. Sorting and sorting data\">4. Sorting and sorting data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#5_Manipulation_of_structured_data\" title=\"5. Manipulation of structured data\">5. Manipulation of structured data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#6_Implementation_of_advanced_algorithms_and_data_structures\" title=\"6. Implementation of advanced algorithms and data structures\">6. Implementation of advanced algorithms and data structures<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#multidimensional_lists\" title=\"multidimensional lists\">multidimensional lists<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Applicability_of_multidimensional_list_python\" title=\"Applicability of multidimensional list python\">Applicability of multidimensional list python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#code_version\" title=\"code version\">code version<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Other_Python_list_methods\" title=\"Other Python list methods\">Other Python list methods<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Example_of_everyday_applications_that_use_lists_in_Python\" title=\"Example of everyday applications that use lists in Python\">Example of everyday applications that use lists in Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/www.copahost.com\/blog\/list-python\/#Cons_of_using_list_Python\" title=\"Cons of using list Python\">Cons of using list Python<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_create_a_Python_list\"><\/span>How to create a Python list?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Sort a collection of values \u200b\u200band separate them with a comma, enclosed in square brackets [].&nbsp;See examples below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example_of_empty_list\"><\/span>Example of empty list:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>empty_list = &#091;]\nprint(empty_list)  # Output: &#091;]<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Adding_elements\"><\/span>Adding elements:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The Python list contains various elements such as numbers, names or other lists.&nbsp;There is more than one way to add elements to lists, we will show below:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">by index in list<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>fruits = &#091;]\nfruits&#091;0]=\"aplle\"\nfruits&#091;1]=\"banana\"<\/code><\/pre>\n\n\n\n<p>In this way, you can arrange each element in a position chosen by you and later call them.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print(fruits)\n&#091;'apple', 'banana']<\/code><\/pre>\n\n\n\n<p>In this list, apple occupies position 0 (first position), and banana occupies second position (1).&nbsp;This happens because, for computers, it is necessary to consider 0 as the first position, which does not happen in mathematics.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Method<code>lista.append<\/code><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>list = &#091;'apple', 'banana', 'orange']\nlist.append('strawberry')\nprint(list)  # Sa\u00edda: &#091;'apple', 'banana', 'orange', 'strawberry']<\/code><\/pre>\n\n\n\n<p>In the method&nbsp;<strong><code><a href=\"https:\/\/www.w3schools.com\/python\/ref_list_append.asp\">append<\/a><\/code><\/strong>, each added element passes to the end of the list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Accessing_list_elements_python\"><\/span>Accessing list elements python<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Access the elements of a list using the index, which starts at 0 for the first element.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>number = &#091;1, 2, 3, 4, 5]\nprint(number&#091;0])  # Output: 1 (first element)\nprint(number&#091;2])  # Output: 3 (third element)\nprint(number&#091;-1])  # Output: 5 (last element)\n<\/code><\/pre>\n\n\n\n<p>In the first example, we selected the element in the first position.&nbsp;In the third example,&nbsp;<code>[-1]<\/code>it refers to the last element in the list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Modifying_list_elements\"><\/span>Modifying list elements<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>number = &#091;1, 2, 3, 4, 5]\nnumber&#091;2] = 10\nprint(number)  # Output: &#091;1, 2, 10, 4, 5]\n<\/code><\/pre>\n\n\n\n<p>In the example, we change the number in the third position to 10.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"operations_with_list_python\"><\/span>operations with list python<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are several simple methods that organize, multiply or divide the lists.&nbsp;Follow:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Concatenation_in_list\"><\/span>Concatenation in list<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>list1 = &#091;1, 2, 3]\nlist2 = &#091;4, 5, 6]\nlist_concatenated = list1 + list2\nprint(list_concatenated)  # output: &#091;1, 2, 3, 4, 5, 6]<\/code><\/pre>\n\n\n\n<p>Elements, such as separate lists that need to be unified, are embedded.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Repetition_in_list\"><\/span>Repetition in list<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>repeat_list = list1 * 3\nprint(repeat_list)  # output: &#091;1, 2, 3, 1, 2, 3, 1, 2, 3]<\/code><\/pre>\n\n\n\n<p>Repeats items in a list and can be done multiple times.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Verification_in_list\"><\/span>Verification in list<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>if 2 in list1:\n    print(\"2 it's in list1\")  # output: 2 it's in list1\n<\/code><\/pre>\n\n\n\n<p>It is a self-explanatory operation.&nbsp;In the example, we check if the value 2 is in the list.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Values_minimums_maximums_and_sum\"><\/span>Values: minimums, maximums and sum<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># min(my_list)\n# max(my_list)\n\nmy_list = &#091;1, 2, 3]\nmin(my_list)\n1\nmax(my_list)\n3<\/code><\/pre>\n\n\n\n<p>This method serves to delimit the values \u200b\u200bin the list, its usability depends on the application in which it is inserted.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"scroll_list_python\"><\/span>scroll list python<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># for item in list:\n#     print(item)\n\nmy_list = &#091;1, 2, 3]\nfor i in my_list:\n    print(i)\n&gt;&gt;&gt; 1\n&gt;&gt;&gt; 2\n&gt;&gt;&gt; 3<\/code><\/pre>\n\n\n\n<p>this method<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Python_list_methods_removing_and_sorting\"><\/span>Python list methods: removing and sorting<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To remove elements from a list, two methods can be used:&nbsp;<code>'pop()'<\/code>and&nbsp;<code>'remove()'<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E2%80%98pop\"><\/span>&#8216;pop()&#8217; <span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>list = &#091;1, 2, 3, 4, 5]\nelement_removed = list.pop(2)\nprint(element_removed)  # output: 3\nprint(list)  # output: &#091;1, 2, 4, 5]\n\nlast_element = list.pop()\nprint(last_element)  # Output: 5\nprint(list)  # Output: &#091;1, 2, 4]\n<\/code><\/pre>\n\n\n\n<p>Removes element from a list based on its index and returns the removed value.&nbsp;However, if there is no index specification, by default the last element of the list is removed.&nbsp;The method&nbsp;<code>pop()<\/code>can be used to remove elements from an empty list, resulting in an error&nbsp;<code>IndexError<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E2%80%98remove\"><\/span>&#8216;remove()&#8217; <span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>list = &#091;1, 2, 3, 2, 4, 5]\nlist.remove(2)\nprint(list)  # Output: &#091;1, 3, 2, 4, 5]\n\nlist.remove(10)  # This will result in ValueError\n<\/code><\/pre>\n\n\n\n<p>Removes the first occurrence of a given value from the list.&nbsp;Still, unlike&nbsp;<code>pop()<\/code>,&nbsp;<code>remove()<\/code>does not use an index to specify which element to remove, but rather the value of the element to be removed.&nbsp;Therefore, if the value is not present in the list, it will result in an error&nbsp;<code>ValueError<\/code>.<\/p>\n\n\n\n<p>The first returns the removed element, allowing you to store it in a variable if needed.&nbsp;However, the second does not return the removed element, it just removes it from the list.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Inserting_multiple_items_in_the_list\"><\/span>Inserting multiple items in the list<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>On the other hand, another way to create an empty list is by the\u00a0<code><a href=\"https:\/\/www.copahost.com\/blog\/while-python\/\">while<\/a> + input<\/code>.\u00a0The first one (\u00a0<code>while<\/code>) deals with a repetition loop, that is, a code structure that repeats a task some number of times.<\/p>\n\n\n\n<p><strong>For example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>while activity:\n   activity= input(enter an activity: ')\n   tasks.append(atividade)\nenter an activity: Like the post\nenter an activity: Share with social networks\nenter an activity: Read other Homehost articles\nenter an activity<\/code><\/pre>\n\n\n\n<p><strong>Using the structure&nbsp;<code>for<\/code>to loop through the elements:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for task in tasks:\n   print(tasks)\nLike post about list in Python\nShare with social networks\nRead other Homehost articles<\/code><\/pre>\n\n\n\n<p>This ensures one&nbsp;<code>print&nbsp;<\/code>of all elements and can display them visually.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Python_list_applicability\"><\/span>Python list applicability<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This type of list can be used for any type of application, be it simple or complex.&nbsp;Thus, Python ends up being one of the most used languages \u200b\u200bin different applications, usually focused on data analysis.&nbsp;As well as every programming language, it also works best in specific fields.&nbsp;See below for examples.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Storage_and_manipulation_of_data_collections\"><\/span>1. Storage and manipulation of data collections<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Ideal for storing and organizing collections of data, such as a list of numbers, names, information records, among others, so they allow you to access, add, remove and modify elements in an efficient way.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Iteration_and_element_processing\"><\/span>2. Iteration and element processing<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>They make it easier to iterate through your elements using&nbsp;<code>loops<\/code>, such as&nbsp;<code><a href=\"https:\/\/www.homehost.com.br\/blog\/pythondjango\/for-em-python\/\">for<\/a><\/code>, allowing you to perform operations on each element, so they are especially useful when dealing with large datasets.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Implementing_stacks_and_queues\"><\/span>3. Implementing stacks and queues<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Lists can be used to implement stacks (&nbsp;<code>stacks<\/code>) along with queues (&nbsp;<code>queues<\/code>), which are important data structures in algorithms and programs.&nbsp;For example: by adding elements to the end of the list and removing them from the end using the method&nbsp;<code>pop()<\/code>, you can create a stack.&nbsp;To create a queue, you can add elements to the end as well as remove them from the beginning using the&nbsp;<code>pop(0)<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Sorting_and_sorting_data\"><\/span>4. Sorting and sorting data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>They have built-in methods that make it easy to sort their elements.&nbsp;For example, the method&nbsp;<code>sort()<\/code>lets you sort the list in ascending order.<\/p>\n\n\n\n<p>As such, it is useful when you need to sort data in a certain order.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Manipulation_of_structured_data\"><\/span>5. Manipulation of structured data<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Lists can contain other types of data such as dictionaries or even other lists, so this allows you to create complex data structures such as arrays (lists of lists) or lists of dictionaries.&nbsp;These structures are useful for representing structured data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_Implementation_of_advanced_algorithms_and_data_structures\"><\/span>6. Implementation of advanced algorithms and data structures<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Lists play a key role in implementing more advanced algorithms and data structures such as trees, graphs, and priority queues.&nbsp;The elements of these structures can be stored and manipulated using lists as a basis.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"multidimensional_lists\"><\/span>multidimensional lists<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Earlier, we mentioned the multidimensional list concept when talking about lists within lists.&nbsp;These lists have multiple columns and rows, where data intersects with specific goals.<\/p>\n\n\n\n<p>Multidimensional lists are widely applied in many cases, especially when looking to organize strategies, items, functions, data and the like.<\/p>\n\n\n\n<p>It is common to observe the use of multidimensional lists in games and management systems, as demonstrated in the examples below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Applicability_of_multidimensional_list_python\"><\/span>Applicability of multidimensional list python<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Hangman:<\/strong>&nbsp;use a multidimensional matrix to store the word to be guessed and the current state of the revealed and hidden letters;<\/li>\n\n\n\n<li><strong>Inventory Management System:<\/strong>&nbsp;store product information in a list of lists, as well as name, price and quantity in stock;<\/li>\n\n\n\n<li><strong>Task Management System:<\/strong>&nbsp;use a multidimensional list to store tasks, where each task is a list containing title, description, deadline, status, etc;<\/li>\n\n\n\n<li><strong>Agenda application:<\/strong>&nbsp;save appointments in a list of lists, where each appointment is a list with information such as date, time, description, location, etc;<\/li>\n\n\n\n<li><strong>Hotel Reservation System:<\/strong>&nbsp;represent hotel rooms in a multidimensional array, where each cell contains occupancy and guest information;<\/li>\n\n\n\n<li><strong>Image Processing:<\/strong>&nbsp;store the pixel values \u200b\u200bof an image in a two-dimensional matrix to allow manipulations such as filtering, resizing, rotation, etc;<\/li>\n\n\n\n<li><strong>Environment Simulation:<\/strong>&nbsp;use a three-dimensional matrix to represent a 3D environment, where each cell contains information about the objects present in that position;<\/li>\n\n\n\n<li><strong>Movie Recommendation System:<\/strong>&nbsp;Keep movie information in a list of movies including title, genre, director, cast, user ratings, etc.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"code_version\"><\/span>code version<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>array of integers<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>matrix = &#091;&#091;1, 2, 3],\n          &#091;4, 5, 6],\n          &#091;7, 8, 9]]\n<\/code><\/pre>\n\n\n\n<p>We have a 3\u00d73 matrix represented by a list of three lists.&nbsp;You can access individual array elements using double indexes, such&nbsp;<code>matriz[0][1]<\/code>as accessing the value 2.<\/p>\n\n\n\n<p>Multidimensional arrays are useful in many fields, such as&nbsp;<strong>image processing, computer graphics, physical simulations, games, among others.&nbsp;<\/strong>They allow representing data in the form of grids or tables, facilitating mathematical operations and manipulation of structured data.<\/p>\n\n\n\n<p><strong>List python of students and their grades<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>students = &#091;&#091;\"Jo\u00e3o\", 8, 7, 6],\n           &#091;\"Maria\", 9, 9, 8],\n           &#091;\"Pedro\", 6, 7, 7]]\n\n<\/code><\/pre>\n\n\n\n<p>Above, each sublist represents a student, where the first element is the name and the following elements are grades in different subjects.&nbsp;You can access specific information for a student, for example,&nbsp;<code>alunos[1][2]<\/code>it would return Maria&#8217;s grade in the second subject (9).<\/p>\n\n\n\n<p>You can use this multidimensional list structure to&nbsp;<strong>store tabular data such as student records, employee information as well as survey results, etc.&nbsp;<\/strong>It facilitates the organization and manipulation of related information.<\/p>\n\n\n\n<p><strong>game board<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>board     = &#091;&#091;\"X\", \"O\", \" \"],\n             &#091;\" \", \"X\", \"O\"],\n             &#091;\"O\", \" \", \"X\"]]\n<\/code><\/pre>\n\n\n\n<p>Here, we have a tic-tac-toe board represented by a 3\u00d73 matrix.&nbsp;Each cell contains an \u201cX\u201d, \u201cO\u201d symbol or empty space.&nbsp;You can access and modify elements to update the game state.<\/p>\n\n\n\n<p>The use of multidimensional lists for this purpose allows checking&nbsp;<strong>the game rules, applying strategies and interacting with players<\/strong>&nbsp;.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Other_Python_list_methods\"><\/span>Other Python list methods<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong>Method&nbsp;<code>extend<\/code>:<\/strong>&nbsp;extends the list, adding the elements of the iterable argument, passed as a parameter.&nbsp;Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>list1 = &#091;1, 2, 3]\nlist2 = &#091;4, 5, 6]\nlist1.extend(list2)\nprint(list1)  # Output: &#091;1, 2, 3, 4, 5, 6]\n<\/code><\/pre>\n\n\n\n<p><strong>Method&nbsp;<code>index<\/code>:<\/strong>&nbsp;Returns the zero-based index of the first item in the list that has a value of&nbsp;<code>x<\/code>.&nbsp;If the value does not exist, the method throws an exception&nbsp;<code>ValueError<\/code>.&nbsp;Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fruits = &#091;'apple', 'banana', 'orange', 'apple']\nindex = fruits.index('orange')\nprint(index)  # Output: 2\n<\/code><\/pre>\n\n\n\n<p><strong>Method&nbsp;<code>count<\/code>:<\/strong>&nbsp;returns the number of times an element appears in the list.&nbsp;Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>number = &#091;1, 2, 3, 4, 4, 5, 4]\noccurrences = number.count(4)\nprint(occurrences)  # Output: 3\n<\/code><\/pre>\n\n\n\n<p><strong>Method&nbsp;<code>sort<\/code>:<\/strong>&nbsp;sorts the items in the list.&nbsp;Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>number = &#091;5, 2, 8, 1, 3]\nnumber.sort()\nprint(number)  # Output: &#091;1, 2, 3, 5, 8]\n<\/code><\/pre>\n\n\n\n<p><strong>Method&nbsp;<code>reverse<\/code>:<\/strong>&nbsp;Reverses the order of the elements.&nbsp;Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>number= &#091;1, 2, 3, 4, 5]\nnumber.reverse()\nprint(number)  # Output: &#091;5, 4, 3, 2, 1]\n<\/code><\/pre>\n\n\n\n<p><strong>Method<code>copy:<\/code><\/strong>&nbsp;returns a shallow copy of the list.&nbsp;Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>list1 = &#091;1, 2, 3]\nlist2 = lista1.copy()\nprint(list2)  # Output: &#091;1, 2, 3]\n<\/code><\/pre>\n\n\n\n<p><strong>Method&nbsp;<code>clear<\/code>:<\/strong>&nbsp;Removes all existing items from the list.&nbsp;Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>list = &#091;1, 2, 3, 4, 5]\nlist.clear()\nprint(list)  # Output: &#091;]\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Example_of_everyday_applications_that_use_lists_in_Python\"><\/span>Example of everyday applications that use lists in Python<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Trello:<\/strong>&nbsp;one of the most used workspaces by any company today, it allows you to organize projects and cards into ordered lists.<\/li>\n\n\n\n<li><strong>Evernote:<\/strong>&nbsp;notes app that lets you create to-do lists and organize information into structured lists.<\/li>\n\n\n\n<li><strong>Spotify:<\/strong>&nbsp;uses playlists to allow users to create and organize their own music collections.<\/li>\n\n\n\n<li><strong>WhatsApp:<\/strong>&nbsp;displays conversations in list form, allowing users to view and respond to messages.<\/li>\n\n\n\n<li><strong>Google Keep:<\/strong>&nbsp;Notes and reminders app that uses lists to help users organize tasks, ideas, and reminders.<\/li>\n\n\n\n<li><strong>Amazon:<\/strong>&nbsp;Uses lists to represent shopping carts, wish lists, and order history.<\/li>\n\n\n\n<li><strong>Google Calendar:<\/strong>&nbsp;Allows you to schedule events and appointments in a list or calendar view.<\/li>\n\n\n\n<li><strong>Contacts:<\/strong>&nbsp;Contact management on mobile devices that uses lists to store and organize contact information such as names, phone numbers, and email addresses.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Cons_of_using_list_Python\"><\/span>Cons of using list Python<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Although we&#8217;ve already talked about its pros, as with any programming language, programming and creating lists in Python has its cons.&nbsp;Read below about some of them.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Performance<\/h4>\n\n\n\n<p>Compared to data structures like arrays or sets, lists can perform poorly in some specific operations.&nbsp;This is because lists in Python are implemented as dynamic arrays, which can result in slower execution time for things like inserting and deleting in middle positions in the list.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Fixed size vs dynamic size<\/h4>\n\n\n\n<p>In some situations you may need to work with a&nbsp;<a href=\"https:\/\/www.copahost.com\/blog\/len-python\/\">fixed size of data<\/a>&nbsp;, where you know the composition and it doesn&#8217;t change.&nbsp;In these situations, an array can be more efficient and take up less memory space than a list.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">efficient search<\/h4>\n\n\n\n<p>If you need to perform frequent searches on a large list, using other data structures such as dictionaries or sets may be more efficient.&nbsp;These structures offer a faster search time compared to linear search in a list.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Immutability<\/h4>\n\n\n\n<p>In Python, lists are mutable, allowing elements to be changed, added, or removed.&nbsp;However, in some scenarios, it is necessary to deal with immutable data, where elements cannot be modified after creation.&nbsp;In these cases, tuples may be more suitable, as they do not allow changes to elements after their creation.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">memory usage<\/h4>\n\n\n\n<p>Lists in Python can consume more memory than other data structures, especially when complex objects or lots of data are present in them.&nbsp;This can become a concern on memory-constrained systems.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Conclusion<\/h4>\n\n\n\n<p>In short, any type of application benefits from using lists in Python.&nbsp;The manipulation, creation and modification of them are simple and practical, as demonstrated in this article.&nbsp;However, it is important to consider the need for its use, as in certain situations it may be unnecessary.<\/p>\n\n\n\n<p>Therefore, when developing your application, initially check which language is most suitable.&nbsp;As mentioned earlier in the cons section, it&#8217;s important to note that using lists in Python can increase processing load and waiting time for processing the required data.<\/p>\n\n\n\n<p>Remembering that no job is irreversible is important.&nbsp;Starting something in Python won&#8217;t give you problems that you can&#8217;t handle.&nbsp;Our advice is to avoid wasting time and setbacks.&nbsp;In programming, time is really important, and you can save it with planning and constant study.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Python list stores data and objects in different ways and offers a linearly organized data structure, where each piece of data has a function and is accessed through an index. Thus, this type of list is considered as a common structure, but with additions and specific functions. There are two reasons to work with [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":3548,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[174],"tags":[],"class_list":["post-3533","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>List in Python: functions and applicability - Copahost<\/title>\n<meta name=\"description\" content=\"The functions and applicability of the list Python are immense, in this article you read about them and work on practical 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.copahost.com\/blog\/list-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"List in Python: functions and applicability - Copahost\" \/>\n<meta property=\"og:description\" content=\"The functions and applicability of the list Python are immense, in this article you read about them and work on practical examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.copahost.com\/blog\/list-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Copahost\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-04T19:49:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-05T16:18:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2023\/08\/lista-python-ingles-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1077\" \/>\n\t<meta property=\"og:image:height\" content=\"595\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Schenia T\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Schenia T\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.copahost.com\/blog\/list-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/list-python\/\"},\"author\":{\"name\":\"Schenia T\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/2efb96f9dfaf6162f347abcd06b1429f\"},\"headline\":\"List in Python: functions and applicability\",\"datePublished\":\"2023-08-04T19:49:54+00:00\",\"dateModified\":\"2023-08-05T16:18:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/list-python\/\"},\"wordCount\":2111,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/list-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2023\/08\/lista-python-ingles-1.png\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.copahost.com\/blog\/list-python\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.copahost.com\/blog\/list-python\/\",\"url\":\"https:\/\/www.copahost.com\/blog\/list-python\/\",\"name\":\"List in Python: functions and applicability - Copahost\",\"isPartOf\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/list-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/list-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2023\/08\/lista-python-ingles-1.png\",\"datePublished\":\"2023-08-04T19:49:54+00:00\",\"dateModified\":\"2023-08-05T16:18:17+00:00\",\"description\":\"The functions and applicability of the list Python are immense, in this article you read about them and work on practical examples.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/list-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.copahost.com\/blog\/list-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.copahost.com\/blog\/list-python\/#primaryimage\",\"url\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2023\/08\/lista-python-ingles-1.png\",\"contentUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2023\/08\/lista-python-ingles-1.png\",\"width\":1077,\"height\":595,\"caption\":\"list python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.copahost.com\/blog\/list-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.copahost.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"List in Python: functions and applicability\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#website\",\"url\":\"https:\/\/www.copahost.com\/blog\/\",\"name\":\"Copahost\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.copahost.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#organization\",\"name\":\"Copahost\",\"url\":\"https:\/\/www.copahost.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png\",\"contentUrl\":\"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png\",\"width\":223,\"height\":40,\"caption\":\"Copahost\"},\"image\":{\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/2efb96f9dfaf6162f347abcd06b1429f\",\"name\":\"Schenia T\",\"description\":\"Data scientist, passionate about technology tools and games. Undergraduate student in Statistics at UFPB. Her hobby is binge-watching series, enjoying good music working or cooking, going to the movies and learning new things!\",\"url\":\"https:\/\/www.copahost.com\/blog\/author\/schenia\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"List in Python: functions and applicability - Copahost","description":"The functions and applicability of the list Python are immense, in this article you read about them and work on practical 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.copahost.com\/blog\/list-python\/","og_locale":"en_US","og_type":"article","og_title":"List in Python: functions and applicability - Copahost","og_description":"The functions and applicability of the list Python are immense, in this article you read about them and work on practical examples.","og_url":"https:\/\/www.copahost.com\/blog\/list-python\/","og_site_name":"Copahost","article_published_time":"2023-08-04T19:49:54+00:00","article_modified_time":"2023-08-05T16:18:17+00:00","og_image":[{"width":1077,"height":595,"url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2023\/08\/lista-python-ingles-1.png","type":"image\/png"}],"author":"Schenia T","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Schenia T","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.copahost.com\/blog\/list-python\/#article","isPartOf":{"@id":"https:\/\/www.copahost.com\/blog\/list-python\/"},"author":{"name":"Schenia T","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/2efb96f9dfaf6162f347abcd06b1429f"},"headline":"List in Python: functions and applicability","datePublished":"2023-08-04T19:49:54+00:00","dateModified":"2023-08-05T16:18:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.copahost.com\/blog\/list-python\/"},"wordCount":2111,"commentCount":0,"publisher":{"@id":"https:\/\/www.copahost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/list-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2023\/08\/lista-python-ingles-1.png","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.copahost.com\/blog\/list-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.copahost.com\/blog\/list-python\/","url":"https:\/\/www.copahost.com\/blog\/list-python\/","name":"List in Python: functions and applicability - Copahost","isPartOf":{"@id":"https:\/\/www.copahost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.copahost.com\/blog\/list-python\/#primaryimage"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/list-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2023\/08\/lista-python-ingles-1.png","datePublished":"2023-08-04T19:49:54+00:00","dateModified":"2023-08-05T16:18:17+00:00","description":"The functions and applicability of the list Python are immense, in this article you read about them and work on practical examples.","breadcrumb":{"@id":"https:\/\/www.copahost.com\/blog\/list-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.copahost.com\/blog\/list-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.copahost.com\/blog\/list-python\/#primaryimage","url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2023\/08\/lista-python-ingles-1.png","contentUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2023\/08\/lista-python-ingles-1.png","width":1077,"height":595,"caption":"list python"},{"@type":"BreadcrumbList","@id":"https:\/\/www.copahost.com\/blog\/list-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.copahost.com\/blog\/"},{"@type":"ListItem","position":2,"name":"List in Python: functions and applicability"}]},{"@type":"WebSite","@id":"https:\/\/www.copahost.com\/blog\/#website","url":"https:\/\/www.copahost.com\/blog\/","name":"Copahost","description":"","publisher":{"@id":"https:\/\/www.copahost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.copahost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.copahost.com\/blog\/#organization","name":"Copahost","url":"https:\/\/www.copahost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png","contentUrl":"https:\/\/www.copahost.com\/blog\/wp-content\/uploads\/2016\/03\/copahostlogo.png","width":223,"height":40,"caption":"Copahost"},"image":{"@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.copahost.com\/blog\/#\/schema\/person\/2efb96f9dfaf6162f347abcd06b1429f","name":"Schenia T","description":"Data scientist, passionate about technology tools and games. Undergraduate student in Statistics at UFPB. Her hobby is binge-watching series, enjoying good music working or cooking, going to the movies and learning new things!","url":"https:\/\/www.copahost.com\/blog\/author\/schenia\/"}]}},"_links":{"self":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/3533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/comments?post=3533"}],"version-history":[{"count":13,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/3533\/revisions"}],"predecessor-version":[{"id":3606,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/posts\/3533\/revisions\/3606"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/media\/3548"}],"wp:attachment":[{"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/media?parent=3533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/categories?post=3533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.copahost.com\/blog\/wp-json\/wp\/v2\/tags?post=3533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}