{"id":12790,"date":"2020-11-24T17:27:00","date_gmt":"2020-11-25T01:27:00","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12790"},"modified":"2023-12-01T04:04:56","modified_gmt":"2023-12-01T12:04:56","slug":"python-min-and-max","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/","title":{"rendered":"Python Min and Max: The Ultimate Guide"},"content":{"rendered":"\n<p><em>The Python max() function is used to find the largest value in a list of values. The Python min() function is used to find the lowest value in a list. The list of values can contain either strings or numbers.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>You may encounter a situation where you want to find the minimum or maximum value in a list or a string. For instance, you may be writing a program that finds the most expensive car sold at your dealership. That\u2019s where Python\u2019s built-in functions <em>min()<\/em> and <em>max()<\/em> come in.&nbsp;<\/p>\n\n\n\n<p>In Python, you can use <em>min()<\/em> and <em>max()<\/em> to find the smallest and largest value, respectively, in a list or a string. This guide will explore how to use the <em>min()<\/em> and <em>max()<\/em> methods in Python and will walk you through a few examples of each.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python min() Function<\/h2>\n\n\n\n<p>The Python min() function returns the lowest value in a list of items. min() can be used to find the smallest number in a list or first string that would appear in the list if the list were ordered alphabetically.<\/p>\n\n\n\n<p>Here\u2019s the syntax for the Python <em>min()<\/em> method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>min(object)<\/pre><\/div>\n\n\n\n<p>In this syntax, the <em>min()<\/em> method only takes in one parameter: the object whose minimum value you want to find.<\/p>\n\n\n\n<p>We can also specify individual values as arguments with the min() function:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>min(value1, value2...)<\/pre><\/div>\n\n\n\n<p>The largest value out of all the values we specify as arguments are returned if you choose to specify individual values.<\/p>\n\n\n\n<p>You can pass an iterable like a list or a list tuple as an argument to the min() method. If an iterable is empty, a ValueError is raised like this:<\/p>\n\n\n\n<p><a href=\"https:\/\/careerkarma.com\/blog\/python-valueerror-max-arg-is-an-empty-sequence\/\">ValueError: max() arg is an empty sequence<\/a><\/p>\n\n\n\n<p>Read our article on the &#8220;ValueError: max() arg is an empty sequence&#8221; (which also applies to the min() method) for more information.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">min Python Example<\/h3>\n\n\n\n<p>Here\u2019s a simple example of using the <em>min()<\/em> method to find the lowest value in a list:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>example_list = [21, 22, 19, 14]\n\nprint(min(example_list))<\/pre><\/div>\n\n\n\n<p>Our code returns: <em>14<\/em>.<\/p>\n\n\n\n<p>On the first line of our code, we define a list called <em>example_list<\/em> that stores four values. On the next line, we use <em>min()<\/em> to find the smallest value in that list and print that value to the console.<\/p>\n\n\n\n<p>Let\u2019s use a more detailed example to show this method in action. Say that we are a coffee shop owner, and we made a list of potential milk vendors. We found six suppliers and created an array that stores the price per gallon that each vendor quoted to us.<\/p>\n\n\n\n<p>We want to find the cheapest supplier in our list, which we can do using the following program:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>supplier_quotes = [3.28, 3.27, 3.29, 3.30, 3.32, 3.26]\n\nprint(&quot;The cheapest price is $&quot;, min(supplier_quotes), &quot; per gallon of milk.&quot;)<\/pre><\/div>\n\n\n\n<p>Our code returns the smallest item in our iterable:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>The cheapest price is $3.26 per gallon of milk.<\/pre><\/div>\n\n\n\n<p>On the first line of our code, we define a list of vendor quotes. Then, we use the <em>min()<\/em> method to find the smallest value, and we print out a message with the result of that method. In this case, the cheapest price available was $3.26 per gallon of milk.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Max Function<\/h2>\n\n\n\n<p>The Python max() function returns the largest value in an iterable, such as a list. If a list contains strings, the last item alphabetically is returned by max().<\/p>\n\n\n\n<p>Let&#8217;s look at the max() function Python syntax:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>max(value1, value2...)<\/pre><\/div>\n\n\n\n<p>You can see that you can specify individual values from which the highest value will be selected.<\/p>\n\n\n\n<p>We can also use this syntax where we pass an iterable as an argument:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>max(list)<\/pre><\/div>\n\n\n\n<p>The second example is the most common use of max(). This code reads through the contents of the specified iterable, such as a list, and returns the largest value in that iterable.<\/p>\n\n\n\n<p>Passing an empty value as an argument to the max() function will result in the same ValueError we discussed earlier.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">max() Python Example<\/h3>\n\n\n\n<p>Say that we are a premium coffee house and we are looking to pay a premium price for quality milk. We could find the largest quote that we received by using the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>supplier_quotes = [3.28, 3.27, 3.29, 3.30, 3.32, 3.26]\n\nprint(&quot;The most expensive price is $&quot;, max(supplier_quotes))<\/pre><\/div>\n\n\n\n<p>Our code returns the largest item in our list:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>The most expensive price is $3.32<\/pre><\/div>\n\n\n\n<p>As you can see, our code is almost identical to the code in the <em>min()<\/em> example above. Instead of using <em>min()<\/em>, we used <em>max()<\/em>.<\/p>\n\n\n\n<p>The <em>max()<\/em> method searched through our <a href=\"https:\/\/careerkarma.com\/blog\/python-array\/\">Python array<\/a> and computed the maximum value in our list. Then, our program printed out a message to the console with that value.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Min and Max with Strings<\/h2>\n\n\n\n<p>In the examples above, we used the <em>min()<\/em> and <em>max()<\/em> methods to find the smallest and largest values in a list.<\/p>\n\n\n\n<p>The <em>min()<\/em> and <em>max()<\/em> methods can also be used to find the <em>smallest<\/em> and <em>largest<\/em> characters in a string. In this case, <em>smallest<\/em> and <em>largest<\/em> refer to the position of the character in the alphabet.<\/p>\n\n\n\n<p>The smallest possible character is the capital letter <em>A<\/em>, since all capital letters come first in Python. Our largest character is the lowercase letter <em>z<\/em>. (To learn more about Python\u2019s ordering system, check out our tutorial on the <a href=\"https:\/\/careerkarma.com\/blog\/python-ord\">Python ord() method<\/a>.)<\/p>\n\n\n\n<p>Let\u2019s say that we have a string that contains the grades for every student in a fifth-grade math class. We want to know what the lowest grade was. To calculate the lowest grade, we could use <em>max()<\/em> function. Here\u2019s an example program that accomplishes this task:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>grades = &quot;AABABBACBAABCD&quot;\n\nprint(&quot;The lowest grade in the class was&quot;, max(grades))<\/pre><\/div>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>The lowest grade in the class was D<\/pre><\/div>\n\n\n\n<p>Our code searches through a <a href=\"https:\/\/careerkarma.com\/blog\/python-substring\/\">Python string<\/a> to find the smallest value. In this case, the lowest grade was D, which our <em>max()<\/em> function identified and returned to our code.<\/p>\n\n\n\n<p>When you\u2019re working strings and the <em>min()<\/em> and <em>max()<\/em> methods, you can specify multiple parameters. This allows you to find the <em>smallest<\/em> and <em>largest<\/em> string out of multiple values.<\/p>\n\n\n\n<p>Say that you have three student names and you want to find out which one comes last alphabetically. You could do so using the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>name_one = &quot;Garry&quot;\nname_two = &quot;Lenny&quot;\nname_three = &quot;Jerry&quot;\n\nprint(&quot;The name that appears last in the alphabet is&quot;, max(name_one, name_two, name_three))<\/pre><\/div>\n\n\n\n<p>Our code returns: <\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>The name that appears last in the alphabet is Lenny<\/pre><\/div>\n\n\n\n<p>The <em>max()<\/em> method took in three parameters: <em>name_one<\/em>, <em>name_two<\/em>, and <em>name_three<\/em>. The <em>max()<\/em> method then calculated which of these names comes last alphabetically and returned that name to the program.<\/p>\n\n\n\n<p>Finally, our code printed out a message that stated the name that appears last in the alphabet.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Often, when you\u2019re working with lists or strings, you\u2019ll want to find the lowest or highest value that appears in that list or string. The Python <em>min()<\/em> and <em>max()<\/em> methods can be used to do so.<\/p>\n\n\n\n<p>This tutorial discussed how to use the <em>min()<\/em> and <em>max()<\/em> methods with Python lists and strings. You\u2019re now ready to start working with <em>min()<\/em> and <em>max()<\/em> on lists and strings like a pro!<\/p>\n\n\n\n<p>To learn more about Python programming, read our <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-python\/\">How to Learn Python guide<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"The Python max() function is used to find the largest value in a list of values. The Python min() function is used to find the lowest value in a list. The list of values can contain either strings or numbers. You may encounter a situation where you want to find the minimum or maximum value&hellip;","protected":false},"author":240,"featured_media":12810,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-12790","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 Min and Max: The Ultimate Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"Python \u201cmin\u201d and \u201cmax\u201d find the minimum and maximum values in lists and strings. Learn how to use min and max 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-min-and-max\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Min and Max: The Ultimate Guide\" \/>\n<meta property=\"og:description\" content=\"Python \u201cmin\u201d and \u201cmax\u201d find the minimum and maximum values in lists and strings. Learn how to use min and max on Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/\" \/>\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-11-25T01:27:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:04:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-touching-open-macbook-on-table-839465.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\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-min-and-max\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python Min and Max: The Ultimate Guide\",\"datePublished\":\"2020-11-25T01:27:00+00:00\",\"dateModified\":\"2023-12-01T12:04:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/\"},\"wordCount\":1101,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-touching-open-macbook-on-table-839465.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/\",\"name\":\"Python Min and Max: The Ultimate Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-touching-open-macbook-on-table-839465.jpg\",\"datePublished\":\"2020-11-25T01:27:00+00:00\",\"dateModified\":\"2023-12-01T12:04:56+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Python \u201cmin\u201d and \u201cmax\u201d find the minimum and maximum values in lists and strings. Learn how to use min and max on Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-touching-open-macbook-on-table-839465.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-touching-open-macbook-on-table-839465.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#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 Min and Max: The Ultimate 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 Min and Max: The Ultimate Guide | Career Karma","description":"Python \u201cmin\u201d and \u201cmax\u201d find the minimum and maximum values in lists and strings. Learn how to use min and max 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-min-and-max\/","og_locale":"en_US","og_type":"article","og_title":"Python Min and Max: The Ultimate Guide","og_description":"Python \u201cmin\u201d and \u201cmax\u201d find the minimum and maximum values in lists and strings. Learn how to use min and max on Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-11-25T01:27:00+00:00","article_modified_time":"2023-12-01T12:04:56+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-touching-open-macbook-on-table-839465.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-min-and-max\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python Min and Max: The Ultimate Guide","datePublished":"2020-11-25T01:27:00+00:00","dateModified":"2023-12-01T12:04:56+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/"},"wordCount":1101,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-touching-open-macbook-on-table-839465.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-min-and-max\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/","url":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/","name":"Python Min and Max: The Ultimate Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-touching-open-macbook-on-table-839465.jpg","datePublished":"2020-11-25T01:27:00+00:00","dateModified":"2023-12-01T12:04:56+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Python \u201cmin\u201d and \u201cmax\u201d find the minimum and maximum values in lists and strings. Learn how to use min and max on Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-min-and-max\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-touching-open-macbook-on-table-839465.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/person-touching-open-macbook-on-table-839465.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-min-and-max\/#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 Min and Max: The Ultimate 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\/12790","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=12790"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12790\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12810"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}