{"id":12881,"date":"2020-05-19T00:53:58","date_gmt":"2020-05-19T07:53:58","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12881"},"modified":"2023-12-01T02:47:32","modified_gmt":"2023-12-01T10:47:32","slug":"python-any-and-all","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/","title":{"rendered":"How to Use Python Any and All: A Step-By-Step Guide"},"content":{"rendered":"\n<p><em>The Python <\/em><code><em>any()<\/em><\/code><em> and <\/em><code><em>all()<\/em><\/code><em> functions evaluate the items in a list to see which are true. The <\/em><code><em>any()<\/em><\/code><em> method returns true if any of the list items are true, and the <\/em><code><em>all()<\/em><\/code><em> function returns true if all the list items are true.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>Often, when you\u2019re programming, you may want to check whether any or all of the values in a list evaluate to True. For instance, if you\u2019re creating a program that tracks the racing history of a driver, you may want to calculate whether that driver has lost any or all of the races in a particular season.&nbsp;<\/p>\n\n\n\n<p>That\u2019s where the Python built-in functions <code>any()<\/code> and <code>all()<\/code> come in. <code>any()<\/code> iterates through every item in an object and returns True if any item is equal to True. <code>all()<\/code> goes through every item in an object and returns True only if every item in the object is equal to True.<\/p>\n\n\n\n<p>This tutorial will discuss how to use the <code>any()<\/code> and <code>all()<\/code> methods in Python, and explore an example of each of these methods in a program.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Any<\/h2>\n\n\n\n<p>The Python <code>any()<\/code> method calculates whether any value in an iterable object\u2014a list, string, or tuple\u2014is equal to True and returns True; otherwise, <code>any()<\/code> returns False.<\/p>\n\n\n\n<p>The <code>any()<\/code> method accepts one parameter: the object with the values you want to search. Here\u2019s the syntax for the <code>any()<\/code> method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>any(iterable_object)<\/pre><\/div>\n\n\n\n<p><code>any()<\/code> returns True if at least one item in an iterable is True.<\/p>\n\n\n\n<p>Otherwise, <code>any()<\/code> will return False if all the elements are not True, or if an iterable object is empty.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Any() With an Array<\/h3>\n\n\n\n<p>Let\u2019s say that we work for a data science company that is analyzing the scores for racers. We have been tasked to find out whether John Appleseed has ever ranked in the top 10 of an Indianapolis 500 race. We have a list of his entries in the race which stores True if he ranked in the top 10, and False if he did not.<\/p>\n\n\n\n<p>To find out whether he has ever ranked in the top 10 of an Indy 500 race, we could use the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>race_wins_indy_500 = [False, False, True, False]\nprint(any(race_wins_indy_500))<\/pre><\/div>\n\n\n\n<p>Our code returns: <code>True<\/code>.  <\/p>\n\n\n\n<p>n the first line of our code, we define a list of values that stores whether he ranked in the top 10 in each time he entered the Indy 500 race. Then, we use the <code>any()<\/code> method to check if any item in the list is True. In this case, he has ranked in the top 10 for the Indy 500 race once, so the <code>any()<\/code> method returned True.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Any() With a Dictionary<\/h3>\n\n\n\n<p>We can also use the <code>any()<\/code> method in a dictionary. Say that we have a record of John Appleseed\u2019s entry at an individual Indy 500 race\u2014the 2018 race\u2014and we want to see whether he ranked in the top 10 for the race. We could do so using this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>indy_500_2018_john = {\n\t'driver_name': 'John Appleseed',\n\t'race_year': 2018,\n\t'top_ten': True\n}\nprint(any(indy_500_2018_john))<\/pre><\/div>\n\n\n\n<p>Our code returns: True. Because our dictionary contains a True value, the <code>any()<\/code> method returns True.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Any() With a String<\/h3>\n\n\n\n<p>Similarly, <code>any()<\/code> can be used with a string or a tuple. In the case of a string, the <code>any()<\/code> method will return True if the string contains a value; otherwise, it will return False.<\/p>\n\n\n\n<p>Let\u2019s say that we want to check whether a string that stores the player\u2019s top 10 ranking for the latest Indy 500 race contains a value. We could use the following code to accomplish this task:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>top_10_ranking = \"\"\nprint(any(top_10_ranking))<\/pre><\/div>\n\n\n\n<p>Our code returns: False. Because John Appleseed did not win the latest Indy 500 race, the variable <code>top_10_ranking<\/code> is empty. So, because the string is empty, our program evaluates to False.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python All<\/h2>\n\n\n\n<p><code>all()<\/code> is a built-in Python function that returns True when all items in an iterable object are True, and returns False otherwise. In addition, if the iterable object is empty, the <code>all()<\/code> method will return True.<\/p>\n\n\n\n<p>The syntax for the <code>all()<\/code> method is the same as the <code>any()<\/code> method. <code>all()<\/code> takes in a single parameter, which is the iterable object through which the <code>all()<\/code> method should search. Here\u2019s the syntax for the <code>all()<\/code> method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>all(iterable_object)<\/pre><\/div>\n\n\n\n<p><code>all()<\/code> returns True when:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>All values are equal to True<\/li>\n\n\n\n<li>The iterable object is empty<\/li>\n<\/ul>\n\n\n\n<p>Otherwise, <code>all()<\/code> returns False.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">All() With an Array<\/h3>\n\n\n\n<p>Let\u2019s walk through an example of how <code>all()<\/code> can be used in Python. Say that we have a list of Boolean values which store whether or not John Appleseed has ranked in the top 10 in any Indy 500 race.<\/p>\n\n\n\n<p>If we want to find out whether he has ranked in the top 10 in all of his races, we could use the <code>all()<\/code> method. Here\u2019s an example program that uses <code>all()<\/code> to check if John Appleseed has ranked in the top 10 in every one of his Indy 500 races:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>race_wins_indy_500 = [False, False, True, False]\nprint(all(race_wins_indy_500))<\/pre><\/div>\n\n\n\n<p>Our code returns: False. On the first line, we declare a list that stores whether or not he ranked in the top 10 in an Indy 500 race. Then, we use <code>all()<\/code> to check whether every value in the list is equal to True. In this case, only one value is equal to True, so our program returns False.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">All() With a Dictionary<\/h3>\n\n\n\n<p>Say that we have a dictionary that stores John Appleseed\u2019s 2018 Indy 500 race record. We want to know whether or not every value in the dictionary evaluates to True. To find this out, we could use the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>indy_500_2018_john = {\n\t'driver_name': 'John Appleseed',\n\t'race_year': 2018,\n\t'top_ten': True\n}\nprint(any(indy_500_2018_john))<\/pre><\/div>\n\n\n\n<p>Our code returns: True. Because every value in the dictionary evaluates to True &#8212; there are no blank or False values in the dictionary &#8212; our code returns True.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">All() With a String<\/h3>\n\n\n\n<p>Similarly, we could use <code>all()<\/code> on a string using the same syntax as we did for the <code>any()<\/code> method.&nbsp;<\/p>\n\n\n\n<p>Say we have a string that stores the name of the racer we are analyzing. If we wanted to check whether this string was empty, we could use the <code>all()<\/code> method. As we discussed earlier, <code>all()<\/code> returns False if a string is empty. Here\u2019s an example of <code>all()<\/code> being used to check if the name of the racer we are analyzing is empty:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>racer_name = \"John Appleseed\"\nprint(all(racer_name))<\/pre><\/div>\n\n\n\n<p>Our code returns: True. The string assigned to the variable <code>racer_name<\/code> contains a value, which means that it evaluates to True when the <code>all()<\/code> method is executed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The <code>any()<\/code> method can be used to check if any item in an iterable object evaluates to True. The <code>all()<\/code> method can be used to check if all items in an iterable object evaluate to True.<\/p>\n\n\n\n<p>This tutorial discussed how to use both the <code>any()<\/code> and <code>all()<\/code> methods in Python, and explored a few examples of these methods being used with different types of iterable objects. Now you have the knowledge you need to start using <code>any()<\/code> and <code>all()<\/code> in Python like a pro!<\/p>\n\n\n\n<p><strong><em>Are you interested in becoming a professional Python developer? Download the <\/em><\/strong><a href=\"https:\/\/careerkarma.com\/\"><strong><em>free Career Karma app<\/em><\/strong><\/a><strong><em> today and talk with one of our expert career coaches about how you can get started on the journey toward your new career.<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"The Python any() and all() functions evaluate the items in a list to see which are true. The any() method returns true if any of the list items are true, and the all() function returns true if all the list items are true. Often, when you\u2019re programming, you may want to check whether any or&hellip;","protected":false},"author":240,"featured_media":12882,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-12881","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":"","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>How to Use Python Any and All: A Step-By-Step Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The Python any() and all() methods check if the values in a list evaluate to True. Learn how to use these methods 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-any-and-all\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use Python Any and All: A Step-By-Step Guide\" \/>\n<meta property=\"og:description\" content=\"The Python any() and all() methods check if the values in a list evaluate to True. Learn how to use these methods on Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/\" \/>\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-05-19T07:53:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T10:47:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-men-and-woman-sitting-in-front-of-blue-table-2422282.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"583\" \/>\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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"How to Use Python Any and All: A Step-By-Step Guide\",\"datePublished\":\"2020-05-19T07:53:58+00:00\",\"dateModified\":\"2023-12-01T10:47:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/\"},\"wordCount\":1111,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-men-and-woman-sitting-in-front-of-blue-table-2422282.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/\",\"name\":\"How to Use Python Any and All: A Step-By-Step Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-men-and-woman-sitting-in-front-of-blue-table-2422282.jpg\",\"datePublished\":\"2020-05-19T07:53:58+00:00\",\"dateModified\":\"2023-12-01T10:47:32+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The Python any() and all() methods check if the values in a list evaluate to True. Learn how to use these methods on Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-men-and-woman-sitting-in-front-of-blue-table-2422282.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-men-and-woman-sitting-in-front-of-blue-table-2422282.jpg\",\"width\":1000,\"height\":583},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#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\":\"How to Use Python Any and All: 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":"How to Use Python Any and All: A Step-By-Step Guide | Career Karma","description":"The Python any() and all() methods check if the values in a list evaluate to True. Learn how to use these methods 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-any-and-all\/","og_locale":"en_US","og_type":"article","og_title":"How to Use Python Any and All: A Step-By-Step Guide","og_description":"The Python any() and all() methods check if the values in a list evaluate to True. Learn how to use these methods on Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-05-19T07:53:58+00:00","article_modified_time":"2023-12-01T10:47:32+00:00","og_image":[{"width":1000,"height":583,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-men-and-woman-sitting-in-front-of-blue-table-2422282.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"How to Use Python Any and All: A Step-By-Step Guide","datePublished":"2020-05-19T07:53:58+00:00","dateModified":"2023-12-01T10:47:32+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/"},"wordCount":1111,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-men-and-woman-sitting-in-front-of-blue-table-2422282.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-any-and-all\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/","url":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/","name":"How to Use Python Any and All: A Step-By-Step Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-men-and-woman-sitting-in-front-of-blue-table-2422282.jpg","datePublished":"2020-05-19T07:53:58+00:00","dateModified":"2023-12-01T10:47:32+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The Python any() and all() methods check if the values in a list evaluate to True. Learn how to use these methods on Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-any-and-all\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-men-and-woman-sitting-in-front-of-blue-table-2422282.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/two-men-and-woman-sitting-in-front-of-blue-table-2422282.jpg","width":1000,"height":583},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-any-and-all\/#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":"How to Use Python Any and All: 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\/12881","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=12881"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12881\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12882"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}