{"id":12041,"date":"2020-08-20T21:07:53","date_gmt":"2020-08-21T04:07:53","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12041"},"modified":"2023-12-01T03:58:04","modified_gmt":"2023-12-01T11:58:04","slug":"python-array","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-array\/","title":{"rendered":"Python Array: A Step-By-Step Guide"},"content":{"rendered":"\n<p><em>Python arrays are a data structure like lists. They contain a number of objects that can be of different data types. In addition, Python arrays can be iterated and have a number of built-in functions to handle them.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Python has a number of built-in data structures, such as arrays. Arrays give us a way to store and organize data, and we can use the built-in Python methods to retrieve or change that data. For example, if you have a list of student names that you want to store, you may want to store them in an array.<\/p>\n\n\n\n<p>Arrays are useful if you want to work with many values of the same <a href=\"https:\/\/careerkarma.com\/blog\/python-data-types\/\">Python data type<\/a>. This might be student names, employee numbers, etc. They allow you to store related pieces of data that belong. And they make it easy to perform the same operation on multiple values at the same time.<\/p>\n\n\n\n<p>In this tutorial, we are going to break down the basics of arrays in Python and how they work. We\u2019ll also cover a few built-in <a href=\"https:\/\/careerkarma.com\/blog\/python-functions\/\">Python functions<\/a> that you can run on your list to add and remove data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Elements of an Array in Python<\/h2>\n\n\n\n<p>In programming, an array can be used to store a <a href=\"https:\/\/careerkarma.com\/blog\/python-list-methods\/\">list of data<\/a>. If you have a bookshelf that you want to categorize, you may want to store the titles of each book in an array. If you have a vinyl collection, you may want to store your data in an array.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Python Array Syntax<\/h3>\n\n\n\n<p>Here is the basic syntax to declare an array in Python:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>students = ['Alex', 'Bill', 'Catherine', 'Andy', 'Molly', 'Rose']\nprint(students)<\/pre><\/div>\n\n\n\n<p>We have created an array! When we print our list of students, our output is the same as the array with data we declared:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>['Alex', 'Bill', 'Catherine', 'Andy', 'Molly', 'Rose']<\/pre><\/div>\n\n\n\n<p>Each item in a list can be referenced, or the list can be referenced as a whole. This means that we are able to perform operations on specific items in our array.<\/p>\n\n\n\n<p>This works because each value in an array has an <em>index<\/em> number, which tells us where the item is within an array. <a href=\"https:\/\/careerkarma.com\/blog\/python-index\/\">Indexes<\/a> start with and correspond with a certain item in an array.<\/p>\n\n\n\n<p>Here is the index of array values we declared above :<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td>\u201cAlex\u201d<\/td><td>\u201cBill\u201d<\/td><td>\u201cCatherine\u201d<\/td><td>\u201cAndy\u201d<\/td><td>\u201cMolly\u201d<\/td><td>\u201cRose\u201d<\/td><\/tr><tr><td>0<\/td><td>1<\/td><td>2<\/td><td>3<\/td><td>4<\/td><td>5<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Calling a Python Array<\/h3>\n\n\n\n<p>Because each item has its own index number, we can access each item in our array. We can do so by calling our list and specifying an index number, like so:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(students[2])<\/pre><\/div>\n\n\n\n<p>Our code will return the name of the student whose index value is two. Here is the output from our code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&quot;Catherine&quot;<\/pre><\/div>\n\n\n\n<p>We can also use negative index numbers to access the items in our list, which allows us to count backward. If we have a long list\u2014say, 100 items\u2014it may be easier for us to count backward than to count from the start. Here are the reverse index numbers for our array above:<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td>\u201cAlex\u201d<\/td><td>\u201cBill\u201d<\/td><td>\u201cCatherine\u201d<\/td><td>\u201cAndy\u201d<\/td><td>\u201cMolly\u201d<\/td><td>\u201cRose\u201d<\/td><\/tr><tr><td>-6<\/td><td>-5<\/td><td>-4<\/td><td>-3<\/td><td>-2<\/td><td>-1<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p><\/p>\n\n\n\n<p>If we want to get the second from the last item in our Python list, we would use the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(students[-2])<\/pre><\/div>\n\n\n\n<p>Our code returns the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&quot;Molly&quot;<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Slicing Items in a Python Array<\/h3>\n\n\n\n<p>We can also slice our Python lists to get multiple values. Let\u2019s say we wanted to get the names in the middle of our list of students. By using a slice operation, we can retrieve multiple values in the list by their index number. These values will be retrieved by creating a range of index numbers, separating them using a colon.<\/p>\n\n\n\n<p>Here\u2019s an example of a slice in Python:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(students[1:5])<\/pre><\/div>\n\n\n\n<p>Our code returns the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>['Bill', 'Catherine', 'Andy', 'Molly']<\/pre><\/div>\n\n\n\n<p>As you can see, our code has returned every name between the index numbers of 1 and 5 on our list. It\u2019s worth noting that the first index number\u2014where the slice starts\u2014is inclusive, and the second index number is exclusive. This means that our code returned the four values between 1 and 5, inclusive of 1.<\/p>\n\n\n\n<p>If we want to get all of the items before a certain point in an array, we can use this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(students[:2])<\/pre><\/div>\n\n\n\n<p>Our code returns the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>['Alex', 'Bill']<\/pre><\/div>\n\n\n\n<p>As you can see above, our code has retrieved all the items whose index value is before <code>2<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Modifying Items in a Python Array<\/h3>\n\n\n\n<p>We can also use indexing to change the values within our list. We achieve this by referencing each item by its index value and assigning it a new value. In the below example, we will replace the name <code>Rose<\/code> with the name <code>Amy<\/code>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>students[5] = &quot;Amy&quot;<\/pre><\/div>\n\n\n\n<p>When we print our list (using<em> <\/em><code>print(students)<\/code>), the name <code>Rose<\/code> will no longer appear, and <code>Amy<\/code> will be in its place:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>['Alex', 'Bill', 'Catherine', 'Andy', 'Molly', 'Amy']<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Python Array Append and Pop<\/h2>\n\n\n\n<p>We have dealt with the same array with which we started. But what if we want to add a new item to our array? That\u2019s where the <code>append()<\/code> function comes in. Using the <code>append()<\/code> array operation allows us to add an element to the end of our array, without declaring a new array.<\/p>\n\n\n\n<p>Here is an example of the <code>append()<\/code> function that will add the name <code>John<\/code> to our list of students:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>students = ['Alex', 'Bill', 'Catherine', 'Andy', 'Molly', 'Rose']\nstudents.append('John')\nprint(students)<\/pre><\/div>\n\n\n\n<p>Our code returns the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>['Alex', 'Bill', 'Catherine', 'Andy', 'Molly', 'Rose', 'John']<\/pre><\/div>\n\n\n\n<p>If we wanted to remove items from our array, we could use the <a href=\"https:\/\/careerkarma.com\/blog\/python-pop\/\">Python pop<\/a><em> <\/em>function. Python <code>pop()<\/code> works in the same way as <code>append()<\/code>, but it works as a remove method that deletes an item from an array. In addition, <code>pop()<\/code> takes an index number as an argument, rather than a string. Here is an example of <code>pop()<\/code> in action:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>students = ['Alex', 'Bill', 'Catherine', 'Andy', 'Molly', 'Rose']\nstudents.pop(0)\nprint(students)<\/pre><\/div>\n\n\n\n<p>Our code removes the individual element with the index value of <code>0<\/code> from our array (which corresponds with the name <code>Alex<\/code>), and returns the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>['Bill', 'Catherine', 'Andy', 'Molly', 'Rose']<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Python Array Methods<\/h2>\n\n\n\n<p>We have scratched the surface of array methods in Python, and there\u2019s a lot more to explore. The basic array methods you need to know are <code>append()<\/code> and <code>pop()<\/code>, which allow you to add and remove items from an array. You also need to know the basic structure of arrays, as we have discussed.<\/p>\n\n\n\n<p>If you want to explore arrays in more depth, here are the main array methods that you may want to investigate:<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td>Method Name<\/td><td>Description<\/td><\/tr><tr><td><code>append()<\/code><\/td><td>Adds an item to an array<\/td><\/tr><tr><td><code>pop()<\/code><\/td><td>Removes an item from an array<\/td><\/tr><tr><td><code>clear()<\/code><\/td><td>Removes all items from an array<\/td><\/tr><tr><td><code>copy()<\/code><\/td><td>Returns a copy of an array<\/td><\/tr><tr><td><code>count()<\/code><\/td><td>Returns the number of elements in a list<\/td><\/tr><tr><td><code>index()<\/code><\/td><td>Returns the index of the first element with a specific value<\/td><\/tr><tr><td><code>insert()<\/code><\/td><td>Adds an element to the array at a specific position<\/td><\/tr><tr><td><code>reverse()<\/code><\/td><td>Reverses the order of the array<\/td><\/tr><tr><td><code>sort()<\/code><\/td><td>Sorts the list<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>View the Repl.it from this tutorial:<\/strong><\/p>\n\n\n\n<iframe loading=\"lazy\" frameborder=\"0\" width=\"100%\" height=\"400px\" src=\"https:\/\/repl.it\/@careerkarma\/Python-Array?lite=true\"><\/iframe>\n<br>\n<br>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Arrays are very flexible data structures in Python that we can use to work with lists of data. In this tutorial, we have demonstrated how arrays can be used to store multiple values and how they are accessed. We&#8217;ve discussed how to retrieve a Python array using its index numbers. We also covered how to modify items in an array.<\/p>\n\n\n\n<p>We discussed how to add and remove items from an array using the <code>append()<\/code> and <code>pop()<\/code> functions, respectively. Now, you\u2019re prepared for a variety of situations where you may need to use an array in Python!<\/p>\n","protected":false},"excerpt":{"rendered":"Python arrays are a data structure like lists. They contain a number of objects that can be of different data types. In addition, Python arrays can be iterated and have a number of built-in functions to handle them. Python has a number of built-in data structures, such as arrays. Arrays give us a way to&hellip;","protected":false},"author":240,"featured_media":12042,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[12687],"class_list":{"0":"post-12041","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python","8":"tag-tutorial"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Python","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python Array: A Step-By-Step Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"Arrays are an important data structure in Python that stores a list of data. Learn the basics of arrays and how to modify them on Career Karma.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/python-array\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Array: A Step-By-Step Guide\" \/>\n<meta property=\"og:description\" content=\"Arrays are an important data structure in Python that stores a list of data. Learn the basics of arrays and how to modify them on Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-array\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-21T04:07:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:58:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ARRAY.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"668\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-array\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-array\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python Array: A Step-By-Step Guide\",\"datePublished\":\"2020-08-21T04:07:53+00:00\",\"dateModified\":\"2023-12-01T11:58:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-array\/\"},\"wordCount\":1169,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-array\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ARRAY.jpg\",\"keywords\":[\"tutorial\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-array\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-array\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-array\/\",\"name\":\"Python Array: A Step-By-Step Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-array\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-array\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ARRAY.jpg\",\"datePublished\":\"2020-08-21T04:07:53+00:00\",\"dateModified\":\"2023-12-01T11:58:04+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Arrays are an important data structure in Python that stores a list of data. Learn the basics of arrays and how to modify them on Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-array\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-array\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-array\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ARRAY.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ARRAY.jpg\",\"width\":1000,\"height\":668},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-array\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/careerkarma.com\/blog\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python Array: A Step-By-Step Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python Array: A Step-By-Step Guide | Career Karma","description":"Arrays are an important data structure in Python that stores a list of data. Learn the basics of arrays and how to modify them on Career Karma.","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:\/\/careerkarma.com\/blog\/python-array\/","og_locale":"en_US","og_type":"article","og_title":"Python Array: A Step-By-Step Guide","og_description":"Arrays are an important data structure in Python that stores a list of data. Learn the basics of arrays and how to modify them on Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/python-array\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-08-21T04:07:53+00:00","article_modified_time":"2023-12-01T11:58:04+00:00","og_image":[{"width":1000,"height":668,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ARRAY.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-array\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-array\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python Array: A Step-By-Step Guide","datePublished":"2020-08-21T04:07:53+00:00","dateModified":"2023-12-01T11:58:04+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-array\/"},"wordCount":1169,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-array\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ARRAY.jpg","keywords":["tutorial"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-array\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-array\/","url":"https:\/\/careerkarma.com\/blog\/python-array\/","name":"Python Array: A Step-By-Step Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-array\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-array\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ARRAY.jpg","datePublished":"2020-08-21T04:07:53+00:00","dateModified":"2023-12-01T11:58:04+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Arrays are an important data structure in Python that stores a list of data. Learn the basics of arrays and how to modify them on Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-array\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-array\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-array\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ARRAY.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ARRAY.jpg","width":1000,"height":668},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-array\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/careerkarma.com\/blog\/python\/"},{"@type":"ListItem","position":3,"name":"Python Array: A Step-By-Step Guide"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=12041"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12041\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12042"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}