{"id":16432,"date":"2020-11-16T05:02:43","date_gmt":"2020-11-16T13:02:43","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=16432"},"modified":"2023-12-01T04:04:04","modified_gmt":"2023-12-01T12:04:04","slug":"python-ternary-operator","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/","title":{"rendered":"Python Ternary Operator: A How-To Guide"},"content":{"rendered":"\n<p><em>The Python ternary operator lets you evaluate whether a condition is true or false. The ternary operator takes up one line of code, which means it is shorter and more concise than a full if&#8230;else statement.<\/em><\/p>\n\n\n\n<p>Conditional statements, such as if statements, allow you to control the flow of your program. The code inside conditional statements only runs when a particular condition is (or set of conditions are) met.\n\n<\/p>\n\n\n\n<p>In Python, the most common way to write a conditional statement is to use <em>if<\/em>. However, the language also offers a way to test for a condition on one-line: the ternary operator.\n\n<\/p>\n\n\n\n<p>This tutorial will discuss, with reference to examples, the basics of conditional statements, and how to use the Python ternary operator.\n\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Conditionals<\/h2>\n\n\n\n<p>When you\u2019re writing a program, you may only want a line or block of code to be executed when a condition is met. This is where conditional statements are useful.<\/p>\n\n\n\n<p>The <a href=\"https:\/\/careerkarma.com\/blog\/python-if-else\/\">Python if statement<\/a> is used to check whether a condition is met.<\/p>\n\n\n\n<p>Suppose we are building an app that checks whether a customer is eligible for a 10% discount at a movie theater. If the customer is aged 65 or over, they should be given a discount, otherwise, no discount should be given. We could build this program using an if&#8230;else statement.<\/p>\n\n\n\n<p>But, if statements take up at least two lines of code. There is a more concise way of writing an if statement if you are only evaluating a few conditions: the ternary operator in Python.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Ternary Operator<\/h2>\n\n\n\n<p>The ternary operator is a type of conditional expression in Python that evaluates a statement. Ternary operators perform an action based on whether that statement is true or false. They are more concise than a traditional if&#8230;else statement.<\/p>\n\n\n\n<p>The syntax for the Python ternary statement is as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>[if_true] if [expression] else [if_false]<\/pre><\/div>\n\n\n\n<p>The ternary conditional operator in Python gets its name from the fact it takes in three parameters: if_true, expression, and if_false.<\/p>\n\n\n\n<p>Ternary operators are usually used to determine the value of a variable. The variable takes on the value of &#8220;if_true&#8221; if the statement evaluates to True or &#8220;if_false&#8221; if the statement evaluates to false.<\/p>\n\n\n\n<p>One way to think of ternary operators is as what a <a href=\"https:\/\/careerkarma.com\/blog\/python-list-comprehension\/\">Python list comprehension<\/a> is to filtering out a list. Or, you could think of what a lambda function is to defining a function.<\/p>\n\n\n\n<p>Both list comprehensions and lambda functions are more efficient ways of performing an action (filtering lists and defining a function, respectively). This is just like how a ternary operator is a more efficient way of writing an if statement.<\/p>\n\n\n\n<p>But, like ternary operators, they should only be used to improve the readability of your code. You should not go overboard with ternary operators otherwise your code may be harder to read.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Ternary Operator Python Example<\/h3>\n\n\n\n<p>Suppose we want to give a customer at our movie theater a discount if they are 65 or older. If a customer is not 65 or older, they are not entitled to a discount. We could check if a customer is eligible to receive a discoutn using the following code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>age = 48\ndiscount = True if age &gt;= 65 else False\nprint(discount)<\/pre><\/div>\n\n\n\n<p>Our code returns: <em>False<\/em>.\n\n<\/p>\n\n\n\n<p>On the first line, we declare a <a href=\"https:\/\/careerkarma.com\/blog\/python-variables\/\">Python variable<\/a> called <em>age<\/em>. This variable is assigned the value 48. Next, we use a ternary operator to calculate whether the customer is eligible for a discount.\n\n<\/p>\n\n\n\n<p>Our ternary operator evaluates the expression age &gt;= 65. Because <em>age<\/em> is equal to 48, this evaluates to False. So, the code that appears after the <em>else<\/em> statement is executed.\n\n<\/p>\n\n\n\n<p>Then, we print the result of our ternary operator to the console. This returns the value False.\n\n<\/p>\n\n\n\n<p>If we compare this example to our last one, you can see that it uses significantly fewer lines of code. Our first program used five lines of code, and this one used three.\n\n<\/p>\n\n\n\n<p>In this example, our ternary operator returns a <a href=\"https:\/\/careerkarma.com\/blog\/python-boolean\/\">Python boolean value<\/a> (True or False). However, we could allow our ternary operator to return any value.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Ternary Python with Numerical Values<\/h3>\n\n\n\n<p>Suppose we want to set a specific discount rate depending on whether the user is eligible for a discount. By default, our movie theater is giving all customers a 5% discount, but seniors (people 65 or older) are eligible for a 10% discount.\n\n<\/p>\n\n\n\n<p>The following program allows us to check whether a customer is eligible for the senior discount. If a customer is not eligible for the senior discount, they are given a 5% discount:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>age = 22\ndiscount = 5 if age &lt; 65 else 10\nprint(discount)<\/pre><\/div>\n\n\n\n<p>Our code returns: 5. In our code, we assign the value 22 to the variable <em>age<\/em>.<\/p>\n\n\n\n<p>We use a ternary operator to check if the value of the <em>age<\/em> variable is less than 65. Because our customer is 22, the statement <em>age &lt; 65<\/em> evaluates to True. This means that the customer is given the 5% discount rate. If our customer was 65 or older, they would receive the 10% discount rate.\n\n<\/p>\n\n\n\n<p>Then, we print the value of the <em>discount<\/em> variable to the console.\n\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The Python ternary operator is a more efficient way of performing simple <em>if<\/em> statements. The ternary operator evaluates a condition, then returns a specific value depending on whether that condition is equal to True or False.<\/p>\n\n\n\n<p>In our examples above, we were able to run an <em>if<\/em> statement on one line. This is more concise than the multiple lines it would typically take to create an <em>if<\/em> statement.<\/p>\n\n\n\n<p>However, the ternary operator cannot always be used. If you want to test for multiple expressions, you should write out a full <em>if<\/em> statement. This will ensure that your code is readable and easy to understand.<\/p>\n\n\n\n<p>This tutorial discussed, with reference to examples, the basics of the Python ternary operator and how it works. Now you have the knowledge you need to use this operator like a Python pro!<\/p>\n\n\n\n<p>To learn more about coding in Python, read our complete guide on <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-python\/\">How to Learn Python<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"The Python ternary operator lets you evaluate whether a condition is true or false. The ternary operator takes up one line of code, which means it is shorter and more concise than a full if...else statement. Conditional statements, such as if statements, allow you to control the flow of your program. The code inside conditional&hellip;","protected":false},"author":240,"featured_media":16433,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-16432","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 Ternary Operator: A How-To Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The Python ternary operator is a conditional expression that executes code depending on whether a condition is true or false. On Career Karma, learn how to use the Python ternary operator.\" \/>\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-ternary-operator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Ternary Operator: A How-To Guide\" \/>\n<meta property=\"og:description\" content=\"The Python ternary operator is a conditional expression that executes code depending on whether a condition is true or false. On Career Karma, learn how to use the Python ternary operator.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/\" \/>\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-16T13:02:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:04:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/background-balance-business-commerce-583846.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\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-ternary-operator\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python Ternary Operator: A How-To Guide\",\"datePublished\":\"2020-11-16T13:02:43+00:00\",\"dateModified\":\"2023-12-01T12:04:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/\"},\"wordCount\":973,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/background-balance-business-commerce-583846.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/\",\"name\":\"Python Ternary Operator: A How-To Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/background-balance-business-commerce-583846.jpg\",\"datePublished\":\"2020-11-16T13:02:43+00:00\",\"dateModified\":\"2023-12-01T12:04:04+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The Python ternary operator is a conditional expression that executes code depending on whether a condition is true or false. On Career Karma, learn how to use the Python ternary operator.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/background-balance-business-commerce-583846.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/background-balance-business-commerce-583846.jpg\",\"width\":1020,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#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 Ternary Operator: A How-To 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 Ternary Operator: A How-To Guide | Career Karma","description":"The Python ternary operator is a conditional expression that executes code depending on whether a condition is true or false. On Career Karma, learn how to use the Python ternary operator.","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-ternary-operator\/","og_locale":"en_US","og_type":"article","og_title":"Python Ternary Operator: A How-To Guide","og_description":"The Python ternary operator is a conditional expression that executes code depending on whether a condition is true or false. On Career Karma, learn how to use the Python ternary operator.","og_url":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-11-16T13:02:43+00:00","article_modified_time":"2023-12-01T12:04:04+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/background-balance-business-commerce-583846.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-ternary-operator\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python Ternary Operator: A How-To Guide","datePublished":"2020-11-16T13:02:43+00:00","dateModified":"2023-12-01T12:04:04+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/"},"wordCount":973,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/background-balance-business-commerce-583846.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/","url":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/","name":"Python Ternary Operator: A How-To Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/background-balance-business-commerce-583846.jpg","datePublished":"2020-11-16T13:02:43+00:00","dateModified":"2023-12-01T12:04:04+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The Python ternary operator is a conditional expression that executes code depending on whether a condition is true or false. On Career Karma, learn how to use the Python ternary operator.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-ternary-operator\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/background-balance-business-commerce-583846.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/background-balance-business-commerce-583846.jpg","width":1020,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-ternary-operator\/#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 Ternary Operator: A How-To 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\/16432","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=16432"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/16432\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/16433"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=16432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=16432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=16432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}