

{"id":5928,"date":"2018-01-15T07:00:44","date_gmt":"2018-01-15T01:30:44","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=5928"},"modified":"2026-04-13T16:56:10","modified_gmt":"2026-04-13T11:26:10","slug":"python-comparison-operators","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/","title":{"rendered":"Python Comparison Operators with Syntax and Examples"},"content":{"rendered":"<p>In our previous article, we talked about <strong>Python bitwise operators<\/strong>. Today, we focus our words on <strong>Python Comparison Operators<\/strong>.<\/p>\n<p>These are also called relational operators in Python.<\/p>\n<p>Along with this, we will learn different types of Comparison Operators in Python: less than, greater than, less than or equal to, greater than or equal to, equal to, and not equal to with their syntax and examples.<\/p>\n<p>So, let&#8217;s start the Python Comparison Operators Tutorial.<\/p>\n<div id=\"attachment_5930\" style=\"width: 1210px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5930\" class=\"wp-image-5930 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators.jpg\" alt=\"Python Comparison Operators with Syntax and Examples\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-5930\" class=\"wp-caption-text\">Python Comparison Operators with Syntax and Examples<\/p><\/div>\n<h3>What is Python Comparison Operator?<\/h3>\n<p>Comparison operators ask questions about two values and return True or False. They are the heart of every if statement and loop guard. The set includes == (equal), != (not equal), &gt; (greater than), &lt; (less than), &gt;=, and &lt;=.<\/p>\n<p>We have six of these, including and limited to- less than, greater than, less than or equal to, greater than or equal to, equal to, and not equal to.<\/p>\n<p>So, let\u2019s begin with the Python Comparison operators.<\/p>\n<h4>1. Python Less Than (&lt;) Operator<\/h4>\n<p>The first comparison\u00a0<strong>operator in python<\/strong> we\u2019ll see here is the less than operator. Denoted by &lt;, it checks if the left value is lesser than that on the right.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 3&lt;6<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p>Since 3 is lesser than 6, it returns True.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 3&lt;3<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<p>Because 3 is equal to 3, and not less than it, this returns False.<\/p>\n<p>But let\u2019s see if we can apply it to values other than ints.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 3&lt;3.0<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<p>Here, 3 is an int, and 3.0 is a float, but 3 isn\u2019t lesser than 3.0, or vice versa.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 3.0&lt;3<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 'Ayushi'&lt;'ayushi'<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p>This one results in True because when comparing strings, their ASCII values are compared. The ASCII value for \u2018A\u2019 is 65, but that for \u2018a\u2019 is 97.<\/p>\n<p>Hence, \u2018A\u2019 is lesser than \u2018a\u2019. Likewise, \u2018Ayushi\u2019 is lesser than \u2018ayushi\u2019.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 0.9999999&lt;True<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p>Yes, it does. But what\u2019s fascinating is that it works on containers like <strong>tuples <\/strong>as well. Let\u2019s see some of these.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; (1,2,3)&lt;(1,2,3,4)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; (1,3,2)&lt;(1,2,3)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; (1,2,3)&lt;(1,3,2)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; ()&lt;(0,)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p>But you can\u2019t compare tuples with different kinds of values.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; (1,2)&lt;('One','Two')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Traceback (most recent call last):File &#8220;&lt;pyshell#84&gt;&#8221;, line 1, in &lt;module&gt;(1,2)&lt;(&#8216;One&#8217;,&#8217;Two&#8217;)<\/p>\n<p>TypeError: &#8216;&lt;&#8216; not supported between instances of &#8216;int&#8217; and &#8216;str&#8217;<\/p>\n<\/div>\n<p>However, if you get comparable elements at the same indices, it is possible to compare two tuples.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; (1,'one')&lt;(2,'two')<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p>And when we say same indices, we mean it.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; (1,'one')&lt;('two',2)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Traceback (most recent call last):File &#8220;&lt;pyshell#86&gt;&#8221;, line 1, in &lt;module&gt;(1,&#8217;one&#8217;)&lt;(&#8216;two&#8217;,2)<\/p>\n<p>TypeError: &#8216;&lt;&#8216; not supported between instances of &#8216;int&#8217; and &#8216;str&#8217;<\/p>\n<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; [0]&lt;[False]<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; {1,2,3}&lt;{1,3,2}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<p>Here, because the other set rearranges itself to {1,2,3}, the two sets are equal. Consequently, it returns False.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; {1:'one',2:'two'}&lt;{1:'three',2:'four'}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Traceback (most recent call last):File &#8220;&lt;pyshell#91&gt;&#8221;, line 1, in &lt;module&gt;<\/p>\n<p>{1:&#8217;one&#8217;,2:&#8217;two&#8217;}&lt;{1:&#8217;three&#8217;,2:&#8217;four&#8217;}<\/p>\n<p>TypeError: &#8216;&lt;&#8216; not supported between instances of &#8216;dict&#8217; and &#8216;dict&#8217;<\/p>\n<\/div>\n<p>If you face any doubt in Python Comparison Operators? Please Comment.<\/p>\n<h4>2. Python Greater Than (&gt;) Operator<\/h4>\n<p>Let&#8217;s see the Greater than Python Comparison Operator<\/p>\n<p>Now that we\u2019ve seen which constructs we can apply these operators to, we will focus on the operators now on.<\/p>\n<p>The greater than an operator, denoted by &gt;, checks whether the left value is greater than the one on the right.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 0.5&gt;False<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 3,4,5&gt;3,4,5.0<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">(3, 4, True, 4, 5.0)<\/div>\n<p>Hey, this created a tuple, when all we wanted to do was compare. This is because it took 5&gt;3 as a value (True). It put this as a value in the tuple.<\/p>\n<p>So let\u2019s try to find our way around this.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 3,4,5 &gt; 3,4,5.0<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">(3, 4, True, 4, 5.0)<\/div>\n<p>So we see that spaces didn\u2019t do it. Let\u2019s try something else.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; 3,4,5&gt;(3,4,5.0)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">\n<p>Traceback (most recent call last):File &#8220;&lt;pyshell#96&gt;&#8221;, line 1, in &lt;module&gt;<\/p>\n<p>3,4,5&gt;(3,4,5.0)<\/p>\n<p>TypeError: &#8216;&gt;&#8217; not supported between instances of &#8216;int&#8217; and &#8216;tuple&#8217;<\/p>\n<\/div>\n<p>Hmm, we think we need to put parentheses around both tuples.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; (3,4,5)&gt;(3,4,5.0)<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<p>Yes, it works now. We told you earlier that it\u2019s okay to skip parentheses while declaring a tuple.<\/p>\n<p>But in this situation, it took 3, 4, and 5 to be ints, and believed that we were declaring a tuple, and not comparing two.<\/p>\n<p>You should take care of such situations by coding carefully.<\/p>\n<h4>3. Less Than or Equal To (&lt;=) Operator<\/h4>\n<p>We guess the next two operators won\u2019t be much of a problem with you. We will quickly learn how to write less than or equal to in Python.<\/p>\n<p>The less than or equal to operator, denoted by &lt;=, returns True only if the value on the left is either less than or equal to that on the right of the operator.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; a=2\r\n&gt;&gt;&gt; a&lt;=a*2<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<h4>4. Equal To or Greater Than &#8211; Python (&gt;=) Operator<\/h4>\n<p>Likewise, this operator returns True only if the value on the left is greater than or equal to that on the right.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; from math import pi\r\n&gt;&gt;&gt; 3.14&gt;=pi<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<p>Any doubt in Python Comparison Operators? Please Ask us in the comment.<\/p>\n<h4>5. Python Equal To (==) Operator<\/h4>\n<p>The final two operators we\u2019ll be looking at are equal to (==) and not equal to (!=).<\/p>\n<p>The equal to operator returns True if the values on either side of the operator are equal.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 3=='3'<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<p>As we know, 3 is an integer, and \u20183\u2019 is a string. Hence, they\u2019re unequal. Let\u2019s take about a couple more examples.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; {1,3,2}=={1,2,3}<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p>Like you know, a set rearranges itself. This is why this returns True.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 0==False<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p>Of course, False has an integer value of 0. Therefore, it returns True.<\/p>\n<h4>6. Python Not Equal Operator (!=) Operator<\/h4>\n<p>Finally, we\u2019ll discuss the not equal to operator. Denoted by !=, this does the exact opposite of the equal to operator.<\/p>\n<p>It returns True if the values on either side of the operator are unequal.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 3!=3.0<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">False<\/div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&gt;&gt;&gt; 3==3.0<\/pre>\n<p><strong>Output<\/strong><\/p>\n<div class=\"code-output\">True<\/div>\n<p>Note that the operator &lt;&gt; for the same purpose is no longer functional.<\/p>\n<p>This is all about the Python Comparison Operators.<\/p>\n<h3>Python Interview Questions on Comparison Operators<\/h3>\n<p>1. How many comparison operators are there in Python?<\/p>\n<p>2. How do you use greater than in Python?<\/p>\n<p>3. What are the different types of operators in Python?<\/p>\n<p>4. How does the operator work in Python?<\/p>\n<p>5. What are relational operators in Python?<\/p>\n<h3>Conclusion<\/h3>\n<p>Concluding for today, we learned six comparison operators in Python.<\/p>\n<p>These are- Python Less Than, Python Greater Than, Less Than or Equal To, Equal to or greater than, Python Equal To and Python Not Equal Operator.<\/p>\n<p>These operators are very useful because they help programs make decisions based on whether one value is bigger, smaller, equal, or different from another. If you use them in the right way, we can write smarter and more useful Python code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous article, we talked about Python bitwise operators. Today, we focus our words on Python Comparison Operators. These are also called relational operators in Python. Along with this, we will learn different&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":35917,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[36639,10434,10744,11503,36638,36640],"class_list":["post-5928","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-comparison-operator-in-python-with-example","tag-python-comparison-operators","tag-python-operators","tag-relational-operators-in-python","tag-types-of-comparison-operator","tag-what-is-python-comparison-operator"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Comparison Operators with Syntax and Examples - DataFlair<\/title>\n<meta name=\"description\" content=\"Discover different types of Comparison Operators in Python and learn how they are used in programs for making decisions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Comparison Operators with Syntax and Examples - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Discover different types of Comparison Operators in Python and learn how they are used in programs for making decisions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-15T01:30:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-13T11:26:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Comparison Operators with Syntax and Examples - DataFlair","description":"Discover different types of Comparison Operators in Python and learn how they are used in programs for making decisions.","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:\/\/data-flair.training\/blogs\/python-comparison-operators\/","og_locale":"en_US","og_type":"article","og_title":"Python Comparison Operators with Syntax and Examples - DataFlair","og_description":"Discover different types of Comparison Operators in Python and learn how they are used in programs for making decisions.","og_url":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-01-15T01:30:44+00:00","article_modified_time":"2026-04-13T11:26:10+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Python Comparison Operators with Syntax and Examples","datePublished":"2018-01-15T01:30:44+00:00","dateModified":"2026-04-13T11:26:10+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/"},"wordCount":1100,"commentCount":24,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators-1.jpg","keywords":["comparison operator in python with example","python comparison operators","python operators","relational operators in python","types of comparison operator","what is python comparison operator"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-comparison-operators\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/","url":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/","name":"Python Comparison Operators with Syntax and Examples - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators-1.jpg","datePublished":"2018-01-15T01:30:44+00:00","dateModified":"2026-04-13T11:26:10+00:00","description":"Discover different types of Comparison Operators in Python and learn how they are used in programs for making decisions.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-comparison-operators\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/01\/Python-Comparison-Operators-1.jpg","width":1200,"height":628,"caption":"Python Comparison Operators with Syntax and Examples"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-comparison-operators\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Python Comparison Operators with Syntax and Examples"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/5928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=5928"}],"version-history":[{"count":18,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/5928\/revisions"}],"predecessor-version":[{"id":147586,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/5928\/revisions\/147586"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/35917"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=5928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=5928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=5928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}