{"id":1519,"date":"2022-02-18T01:21:42","date_gmt":"2022-02-18T01:21:42","guid":{"rendered":"https:\/\/mypythonfundamentals.com\/?p=1519"},"modified":"2023-01-31T04:27:03","modified_gmt":"2023-01-31T04:27:03","slug":"data-structures","status":"publish","type":"post","link":"https:\/\/mypythonfundamentals.com\/index.php\/2022\/02\/18\/data-structures\/","title":{"rendered":"Data Structures"},"content":{"rendered":"\n<p>In Python, there are several built-in data structures that can be used to store and manipulate data, including:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Lists:<\/strong> An ordered collection of elements, which can be of different data types, including other lists. Lists are mutable, which means that elements can be added, removed, or changed.<\/li><li><strong>Tuples:<\/strong> An ordered, immutable collection of elements, which can be of different data types, including other tuples. Once created, the elements in a tuple cannot be modified.<\/li><li><strong>Dictionaries: <\/strong>An unordered collection of key-value pairs, where each key maps to a value. Dictionaries are mutable and have no order.<\/li><li><strong>Sets:<\/strong> An unordered collection of unique elements. Sets are mutable, and elements in sets can be added, removed, or modified.<\/li><li><strong>Strings:<\/strong> A sequence of characters that are used to represent text. Strings are immutable, which means that once created, the elements in a string cannot be modified.<\/li><li><strong>Arrays:<\/strong> An ordered collection of elements of the same data type. Arrays are available in the &#8220;array&#8221; module in Python.<\/li><li><strong>Queues:<\/strong> A collection of elements where the first element to be added is the first to be removed (first-in-first-out). Queues are available in the &#8220;queue&#8221; module in Python.<\/li><li><strong>Stacks:<\/strong> A collection of elements where the last element to be added is the first to be removed (last-in-first-out). Stacks are available in the &#8220;queue&#8221; module in Python.<\/li><\/ol>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Python, there are several built-in data structures that can be used to store and manipulate data, including: Lists: An ordered collection of elements, which can be of different data types, including other lists. Lists are mutable, which means that &hellip; <a href=\"https:\/\/mypythonfundamentals.com\/index.php\/2022\/02\/18\/data-structures\/\">Continued<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"redux-templates_canvas","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[22],"tags":[],"class_list":["post-1519","post","type-post","status-publish","format-standard","hentry","category-data-structures"],"_links":{"self":[{"href":"https:\/\/mypythonfundamentals.com\/index.php\/wp-json\/wp\/v2\/posts\/1519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mypythonfundamentals.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mypythonfundamentals.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mypythonfundamentals.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mypythonfundamentals.com\/index.php\/wp-json\/wp\/v2\/comments?post=1519"}],"version-history":[{"count":2,"href":"https:\/\/mypythonfundamentals.com\/index.php\/wp-json\/wp\/v2\/posts\/1519\/revisions"}],"predecessor-version":[{"id":1574,"href":"https:\/\/mypythonfundamentals.com\/index.php\/wp-json\/wp\/v2\/posts\/1519\/revisions\/1574"}],"wp:attachment":[{"href":"https:\/\/mypythonfundamentals.com\/index.php\/wp-json\/wp\/v2\/media?parent=1519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mypythonfundamentals.com\/index.php\/wp-json\/wp\/v2\/categories?post=1519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mypythonfundamentals.com\/index.php\/wp-json\/wp\/v2\/tags?post=1519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}