{"id":12053,"date":"2020-10-21T23:24:35","date_gmt":"2020-10-22T06:24:35","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12053"},"modified":"2023-12-01T04:03:18","modified_gmt":"2023-12-01T12:03:18","slug":"python-zip","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-zip\/","title":{"rendered":"Python Zip: A Step-By-Step Guide"},"content":{"rendered":"\n<p><em>The Python zip() function accepts iterable items and merges them into a single tuple. The resultant value is a zip object that stores pairs of iterables. You can pass lists, tuples, sets, or dictionaries through the zip() function.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Python has a number of built-in functions that allow coders to loop through data. One of these functions is Python zip. The <em>zip()<\/em> function creates an iterator that will merge elements from two or more data sources into one.<\/p>\n\n\n\n<p>In this tutorial, we are going to break down the basics of Python <em>zip().<\/em> We&#8217;ll also discuss how to iterate over a zip and how to unzip a zipped object.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Iteration Refresher<\/h2>\n\n\n\n<p>In Python, we use the term <em>i<\/em><a href=\"https:\/\/careerkarma.com\/blog\/python-iterator\/\"><em>terate<\/em><\/a> to describe when a program is running through a list. For example, say you have a <a href=\"https:\/\/careerkarma.com\/blog\/python-for-loop\/\"><em>for<\/em><\/a> loop that prints out the name of every branch a company operates. We would say that our program is <em>iterating<\/em> through the list of names.<\/p>\n\n\n\n<p>An <em>iterable<\/em>, on the other hand, is an object that can return its member items individually. Arrays are iterables because you can print out each item individually by using a <em>for<\/em> loop.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python zip Function<\/h2>\n\n\n\n<p>The zip() function combines the contents of two or more iterables. zip() returns a zip object. This is an iterator of tuples where all the values you have passed as arguments are stored as pairs.<\/p>\n\n\n\n<p>Python\u2019s <em>zip()<\/em> function takes an iterable\u2014such as a list, tuple, <a href=\"https:\/\/careerkarma.com\/blog\/python-sets\/\">set<\/a>, or <a href=\"https:\/\/careerkarma.com\/blog\/python-dictionary-keys\/\">dictionary<\/a>\u2014as an argument. The function will generate a list of tuples that contain elements from each iterable you have passed into the function.<\/p>\n\n\n\n<p>The syntax for the zip() function is as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>zip(iterable1, iterable2, ...)<\/pre><\/div>\n\n\n\n<p>You can include as many iterables as you want. You must specify the iterables you want to merge as arguments to the zip() function.<\/p>\n\n\n\n<p>The zip() method continues executing until the iterable objects are fully zipped. This happens when the iterables are exhausted. In other words, the zip() method stops when all of the possible pairs are created.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">zip Python Example<\/h2>\n\n\n\n<p>Let\u2019s say you have two <a href=\"https:\/\/careerkarma.com\/blog\/python-array\/\">Python lists<\/a>. One list contains employee names and the other list contains employee numbers. You want to merge both lists all into an array of tuples. This will let you store employee names and numbers side-by-side.<\/p>\n\n\n\n<p>We can use the <em>zip()<\/em> function to merge our two lists. Here is an example program that will merge this data:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>employee_numbers = [2, 9, 18, 28]\nemployee_names = [&quot;Candice&quot;, &quot;Ava&quot;, &quot;Andrew&quot;, &quot;Lucas&quot;]\n\nzipped_values = zip(employee_names, employee_numbers)\nzipped_list = list(zipped_values)\n\nprint(zipped_list)<\/pre><\/div>\n\n\n\n<p>Our zip function returns the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>[('Candice', 2), ('Ava', 9), ('Andrew', 18), ('Lucas', 28)]<\/pre><\/div>\n\n\n\n<p>Our program has created an array of <a href=\"https:\/\/careerkarma.com\/blog\/python-tuples\/\">tuple items<\/a>. Each tuple contains the name of an employee and the respective employee number.<\/p>\n\n\n\n<p>On the first two lines of our code, we declare variables that store our employee numbers and employee names.<\/p>\n\n\n\n<p>Next, we perform a <em>zip()<\/em> function. This function merges our two lists together and creates a new array of tuples.<\/p>\n\n\n\n<p>We convert our zip item into a list. This is because the zip() function returns a zip object. We can iterate over a zip object. However, we cannot print out a zip to the console and see its contents in a readable form. We must convert our zip object to a list, so we can view the contents of the zip from the console.<\/p>\n\n\n\n<p>We can tell that our <em>zipped_values<\/em> is a <em>zip()<\/em> item by adding the following code to our above program:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(type(zipped_values))<\/pre><\/div>\n\n\n\n<p>Our code returns the following zipped class:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>&lt;class 'zip'&gt;<\/pre><\/div>\n\n\n\n<p>In the above example, we zipped two items together. However, if we had more that we wanted to zip, we could also do that. The only change we would make is to pass another list of items to our <em>zip()<\/em> function.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Looping Over Iterables Using zip in Python<\/h2>\n\n\n\n<p>The zip() function returns an iterator. This means we can view the contents of each zipped item individually.<\/p>\n\n\n\n<p>Working with multiple iterables is one of the most popular use cases for the <em>zip()<\/em> function in Python. For example, if you want to go through multiple lists, you may want to make use of the <em>zip()<\/em> function.<\/p>\n\n\n\n<p>Let&#8217;s use the zip() function to iterate over both our employee_numbers and employee_names lists:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>employee_numbers = [2, 9, 18, 28]\nemployee_names = [&quot;Candice&quot;, &quot;Ava&quot;, &quot;Andrew&quot;, &quot;Lucas&quot;]\n\nfor name, number in zip(employee_names, employee_numbers):\n\tprint(name, number)<\/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>Candice 2\nAva 9\nAndrew 18\nLucas 28<\/pre><\/div>\n\n\n\n<p>Our program iterates through the list of tuples that <em>zip()<\/em> returns, and divides them into two values: name and number.<\/p>\n\n\n\n<p>This makes it easy for us to iterate through multiple iterable objects at once. We can now view each employee name alongside their respective employee number. If we wanted to, we could use this to iterate through three or more iterable objects.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Unzip Values in Python<\/h2>\n\n\n\n<p>In our code, we have zipped various types of data. But how do we restore data to its previous form? If you have a list of tuples\u2014or zipped values\u2014that you want to divide, you can use the <em>zip()<\/em> function\u2019s unpacking operator. This is an asterisk <em>*<\/em> used in conjunction with the <em>zip()<\/em> function.<\/p>\n\n\n\n<p>Here is an example of the <em>zip()<\/em> unpacking operator in action:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>employees_zipped = [('Candice', 2), ('Ava', 9), ('Andrew', 18), ('Lucas', 28)]\nemployee_names, employee_numbers = zip(*employees_zipped)\n\nprint(employee_names)\nprint(employee_numbers)<\/pre><\/div>\n\n\n\n<p>Our code returns the following output:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>('Candice', 'Ava', 'Andrew', 'Lucas')\n(2, 9, 18, 28)<\/pre><\/div>\n\n\n\n<p>On the first line of our code, we define a variable that includes a list of tuples. Then, on the next line, we define two variables. These variables are <em>employee_names<\/em> and <em>employee_numbers.<\/em> We assign these variables values from our unzip function.<\/p>\n\n\n\n<p>The unzip function is a zip function that takes our <em>employees_zipped<\/em> variable unpacks the zip using uses the unpacking operator <em>*<\/em>. In our above example, we print out our two new variables that contain our employee names and employee numbers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The zip() function receives iterable objects as an input and combines them into a zip() object. This zip() object displays values from each iterable input side-by-side. This can be useful if you have two or more arrays or tuples that you want to merge into one.<\/p>\n\n\n\n<p>We have discussed how to use the <em>zip()<\/em> function with zero or one input. You can use <em>zip()<\/em> to loop over iterables and you can unzip data that you have already zipped. You are now on your way to becoming a master of the Python <em>zip()<\/em> function.<\/p>\n\n\n\n<p>Read our <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-python\/\">How to Code in Python guide<\/a> for more tips and advice on learning the Python software development language.<\/p>\n","protected":false},"excerpt":{"rendered":"The Python zip() function accepts iterable items and merges them into a single tuple. The resultant value is a zip object that stores pairs of iterables. You can pass lists, tuples, sets, or dictionaries through the zip() function. Python has a number of built-in functions that allow coders to loop through data. One of these&hellip;","protected":false},"author":240,"featured_media":12054,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-12053","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python"},"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 Zip: A Step-By-Step Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The Python zip() function creates an iterator that merges data from two iterables. Learn more about how the zip() function works in this article.\" \/>\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-zip\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Zip: A Step-By-Step Guide\" \/>\n<meta property=\"og:description\" content=\"The Python zip() function creates an iterator that merges data from two iterables. Learn more about how the zip() function works in this article.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-zip\/\" \/>\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-10-22T06:24:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:03:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ZIP.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"562\" \/>\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-zip\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-zip\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python Zip: A Step-By-Step Guide\",\"datePublished\":\"2020-10-22T06:24:35+00:00\",\"dateModified\":\"2023-12-01T12:03:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-zip\/\"},\"wordCount\":1026,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-zip\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ZIP.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-zip\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-zip\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-zip\/\",\"name\":\"Python Zip: A Step-By-Step Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-zip\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-zip\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ZIP.jpg\",\"datePublished\":\"2020-10-22T06:24:35+00:00\",\"dateModified\":\"2023-12-01T12:03:18+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The Python zip() function creates an iterator that merges data from two iterables. Learn more about how the zip() function works in this article.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-zip\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-zip\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-zip\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ZIP.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ZIP.jpg\",\"width\":1000,\"height\":562},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-zip\/#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 Zip: 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 Zip: A Step-By-Step Guide | Career Karma","description":"The Python zip() function creates an iterator that merges data from two iterables. Learn more about how the zip() function works in this article.","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-zip\/","og_locale":"en_US","og_type":"article","og_title":"Python Zip: A Step-By-Step Guide","og_description":"The Python zip() function creates an iterator that merges data from two iterables. Learn more about how the zip() function works in this article.","og_url":"https:\/\/careerkarma.com\/blog\/python-zip\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-10-22T06:24:35+00:00","article_modified_time":"2023-12-01T12:03:18+00:00","og_image":[{"width":1000,"height":562,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ZIP.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-zip\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-zip\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python Zip: A Step-By-Step Guide","datePublished":"2020-10-22T06:24:35+00:00","dateModified":"2023-12-01T12:03:18+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-zip\/"},"wordCount":1026,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-zip\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ZIP.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-zip\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-zip\/","url":"https:\/\/careerkarma.com\/blog\/python-zip\/","name":"Python Zip: A Step-By-Step Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-zip\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-zip\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ZIP.jpg","datePublished":"2020-10-22T06:24:35+00:00","dateModified":"2023-12-01T12:03:18+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The Python zip() function creates an iterator that merges data from two iterables. Learn more about how the zip() function works in this article.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-zip\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-zip\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-zip\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ZIP.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/02\/PYTHON-ZIP.jpg","width":1000,"height":562},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-zip\/#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 Zip: 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\/12053","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=12053"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12053\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12054"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}