{"id":4081,"date":"2019-08-04T18:32:03","date_gmt":"2019-08-04T18:32:03","guid":{"rendered":"https:\/\/tutorialsclass.com\/?p=4081"},"modified":"2021-02-03T07:01:52","modified_gmt":"2021-02-03T07:01:52","slug":"python-operators","status":"publish","type":"post","link":"https:\/\/tutorialsclass.com\/python-operators\/","title":{"rendered":"Python Operators"},"content":{"rendered":"\n<p>Python Operators are symbols to perform a specific mathematical, relational or logical operation and produce the final result.<\/p>\n\n\n\n<p>Python Operators helps us to perform a lot of operations on <a href=\"https:\/\/tutorialsclass.com\/python-variables\/\" target=\"_blank\" rel=\"noreferrer noopener\"> Python Variables<\/a>. These are required for arithmetic operations, to match different variables, assigning value to other variables, and many other operations.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Type of Python variables<\/h2>\n\n\n\n<p>Python Operators are categorised into the following groups:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Arithmetic operators<\/li><li>Assignment operators<\/li><li>Comparison operators<\/li><li>Logical operators<\/li><li>Identity operators<\/li><li>Membership operators<\/li><li>Bitwise Operators<\/li><\/ul>\n\n\n\n<p>In this Python tutorial, we are going to learn all these Python Operators with examples step by step.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Arithmetic operators<\/h3>\n\n\n\n<p>The Python Arithmetic operators are used with numeric values to perform common arithmetical operations, such as addition, subtraction, multiplication, etc.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th><strong>Operator<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><tr><td>+<\/td><td><strong>Addition<\/strong>&nbsp;of two operands.<\/td><td>x + y<\/td><\/tr><tr><td>\u2013<\/td><td><strong>Subtracts<\/strong>&nbsp;second operand from the first.<\/td><td>x \u2212 y<\/td><\/tr><tr><td>*<\/td><td><strong>Multiplies<\/strong>&nbsp;both operands.<\/td><td>x * y<\/td><\/tr><tr><td>\/<\/td><td><strong>Divides<\/strong>&nbsp;numerator by denominator and gives us the Quotient.<\/td><td>y \/ x<\/td><\/tr><tr><td>%<\/td><td>Modulus Operator: calculate the remainder of after an integer division.<\/td><td>y % x<\/td><\/tr><tr><td>**<\/td><td>Exponentiation y to x i.e. x<sup>y<\/sup><\/td><td>x**y<\/td><\/tr><tr><td>\/\/<\/td><td>Floor Division of x\/\/y rounds the result down the division to the nearest whole number<\/td><td>x\/\/y<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>x = 5\ny = 3\nprint(x+y)     # will give 8\nprint(x-y)     # will give 2\nprint(x*y)     # will give 15\nprint(x\/y)     # will give 1.6666666666666667\nprint(x % y)   # will give 2\nprint(x**y)    # will give 125\nprint(x\/\/y)    # will give 1<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Assignment operators<\/h3>\n\n\n\n<p>The Python assignment operators are used with numeric values to assign a value to a variable. One of the common assignment operators in Python is &#8220;=&#8221;. It means that the left operand gets set to the value of the assignment expression on the right. Mostly when we declare a variable, we also assign a value to it.<\/p>\n\n\n\n<p>Here is the table which shows all the assignment OPerators supported in Python Programming.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th><strong>Operator<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><tr><td>=<\/td><td>assign it\u2019s value to the other<\/td><td>x = y<\/td><\/tr><tr><td>+=<\/td><td>Assign the value after addition<\/td><td>x+=y same as x=x+y<\/td><\/tr><tr><td>-=<\/td><td>Assign the value after subtraction<\/td><td>x-=y same as x=x-y<\/td><\/tr><tr><td>*=<\/td><td>Assign the value after multiplication<\/td><td>x*=y same as x=x*y<\/td><\/tr><tr><td>\/=<\/td><td>Assign the value after calculating the quotient<\/td><td>x\/=y same as x=x\/y<\/td><\/tr><tr><td>%=<\/td><td>Assign the value after calculating the remainder<\/td><td>x%=y same as x=x%y<\/td><\/tr><tr><td>\/\/<\/td><td>Floor Division of x\/\/y rounds the result down the division to the nearest whole number<\/td><td>x\/\/y<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Comparison Operators<\/h3>\n\n\n\n<p>The Python Comparison Operators are used to compare two values. The values can be of any type such as numbers, strings, complex numbers, etc. Comparison operators are also known as Relational Operators. Here is the table which shows all Comparison supported in Python programming:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Operator<\/th><th>Description<\/th><th>Example<\/th><\/tr><tr><td>==<\/td><td>If the values of both operands are equal, then the condition becomes true, and return True otherwise return false.<\/td><td>A == B.<\/td><\/tr><tr><td>!=<\/td><td>If values are not equal, then the condition becomes true and return true otherwise return false.<\/td><td>A != B.<\/td><\/tr><tr><td>&gt;<\/td><td>If the value of the left operand is greater than the value of right operand, then the condition becomes true.<\/td><td>A &gt; B<\/td><\/tr><tr><td>&lt;<\/td><td>If the value of the left operand is less than the value of right operand, then the condition becomes true and return 1 otherwise return 0(false).<\/td><td>A &lt; B<\/td><\/tr><tr><td>&gt;=<\/td><td>Either the value of the left operand is greater than or equal to the value of right operand, then the condition becomes true and returns 1 otherwise return 0(false).<\/td><td>A&gt;=B<\/td><\/tr><tr><td>&lt;=<\/td><td>Either the value of the left operand is less than or equal to the value of right operand, then the condition becomes true and returns 1 otherwise return 0(false).<\/td><td>A&lt;=B<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Example of Comparison Operator<\/h4>\n\n\n\n<p>We have discussed the different Comparison operators. Now let&#8217;s see a simple example of all Comparison Operators.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>x = 10\ny = 20\nprint(x == y)   # return False\nprint(x != y)   # return True\nprint(x &lt; y)    # return True\nprint(x > y)    # return False\nprint(x &lt;= y)   # return True\nprint(x >= y)   # return False<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Logical Operators<\/h3>\n\n\n\n<p>The Python logical operators are used to combine conditional statements. Here is the table showing all logical operators supported by Python:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Operator<\/th><th>Description<\/th><th>Example<\/th><\/tr><tr><td>and<\/td><td>Logical AND operator. if both conditions are true then it returns true otherwise returns false.<\/td><td>xy<\/td><\/tr><tr><td>or<\/td><td>Logical OR Operator. If any of condition is true, then it will return true otherwise returns false.<\/td><td>xy<\/td><\/tr><tr><td>not<\/td><td>Logical NOT Operator. it reverses the result such as if the condition is true then it will return false and vice-versa.<\/td><td>not(x<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Example of Logical Operator<\/h4>\n\n\n\n<p>Let&#8217;s see a simple example using logical operators.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>x = 1\ny = 2\nresult1 = (x &lt; y) and (x > y)\nresult2 = (x > y) and (x &lt; y)\nresult3 = (x > y) and (x == y)\nresult4 = (x &lt; y) and (x &lt;= y)\nresult5 = (x &lt; y) or (x > y)\nresult6 = (x > y) or (x &lt; y)\nresult7 = (x > y) or (x == y)\nresult8 = (x &lt; y) or (x &lt;= y)\nresult9 = not((x &lt; y) and (x > y))\nresult10 = not((x &lt; y) or (x > y))\nprint(result1)                  # return False\nprint(result2)                  # return False\nprint(result3)                  # return False\nprint(result4)                  # return True\nprint(result5)                  # return True\nprint(result6)                  # return True\nprint(result7)                  # return False\nprint(result8)                  # return True\nprint(result9)                  # return True\nprint(result10)                 # return False<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>False\nFalse\nFalse\nTrue\nTrue\nTrue\nFalse\nTrue\nTrue\nFalse<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Identity Operator<\/h3>\n\n\n\n<p>An identity operator in python is used to check whether the identity of a variable or object is the same as other variables or objects. Variables can be identical in different ways such as value, datatype, etc.<\/p>\n\n\n\n<p>For example, if a variable has integer type value, and we want to check if the other variable is the same as the first variable. Then we use the identity operator.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th><strong>Operator<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><tr><td>is<\/td><td>If the identity of a variable(datatype) is the same then it will return true, otherwise returns false.<\/td><td>x is y<\/td><\/tr><tr><td>is not<\/td><td>If the identity of a variable(datatype) is the same then it will return true, otherwise returns false.<\/td><td>x is not y<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Example of Identitical Operators<\/h4>\n\n\n\n<p>Let&#8217;s see a simple example of all the identical operators in Python programming.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>x = 2\ny = 3\nresult1 = x is y\nresult2 = x is not y\nresult3 = type(x) is type(y)\nresult4 = type(x) is not type(y)\nprint(result1, result2, result3, result4)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>False True True False<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Membership Operator<\/h3>\n\n\n\n<p>Membership Operator in python is used to check whether a sequence is a member of other variables or lists. In other words, these operators check if a variable is present in the other variable or not.<br>There is two inbuilt Membership operator in Python Programming:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th><strong>Operator<\/strong><\/th><th><strong>Description<\/strong><\/th><th><strong>Example<\/strong><\/th><\/tr><tr><td>in<\/td><td>If the value of a sequence is found in the other sequence then it will return true, otherwise returns false.<\/td><td>x in y<\/td><\/tr><tr><td>not in<\/td><td>If the value of a sequence is found in the other sequence then it will return false, otherwise returns true.<\/td><td>x is not y<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Example of Membership Operators<\/h4>\n\n\n\n<p>Let&#8217;s see a simple example of all the membership operators in Python programming.<\/p>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>print(\"Welcome\" in \"Welcome to Tutorials Class\")\nprint(\"welcome\" in \"Welcome to Tutorials Class\")\nprint(\"Welcome\" not in \"Welcome to Tutorials Class\")\nprint(\"welcome\" not in \"Welcome to Tutorials Class\")<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>True\nFalse\nFalse\nTrue<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Bitwise Operators<\/h3>\n\n\n\n<p>With the help of Python Bitwise Operators, we can easily perform bitwise operations such as converting bit value from 0 to 1, shifting left to right, etc. Here is the table of all the bitwise operators supported in Python programming:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Operator<\/th><th>Description<\/th><th>Example<\/th><\/tr><tr><td>&amp; Binary AND<\/td><td>Operator copies a bit to the result if it exists in both operands<\/td><td>(a &amp; b) (means 0000 1100)<\/td><\/tr><tr><td>| Binary OR<\/td><td>It copies a bit if it exists in either operand.<\/td><td>(a | b) = 61 (means 0011 1101)<\/td><\/tr><tr><td>^ Binary XOR<\/td><td>It copies the bit if it is set in one operand but not both.<\/td><td>(a ^ b) = 49 (means 0011 0001)<\/td><\/tr><tr><td>~ Binary One&#8217;s Complement<\/td><td>It is unary and has the effect of \u2018flipping\u2019 bits.<\/td><td>(~a ) = -61 (means 1100 0011 in 2\u2019s complement form due to a signed binary number.<\/td><\/tr><tr><td>&lt;&lt; Binary Left Shift<\/td><td>The left operands value is moved left by the number of bits specified by the right operand.<\/td><td>a &lt;&lt; 2 = 240 (means 1111 0000)<\/td><\/tr><tr><td>&gt;&gt; Binary Right Shift<\/td><td>The left operands value is moved right by the number of bits specified by the right operand.<\/td><td>a &gt;&gt; 2 = 15 (means 0000 1111)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Example of Bitwise Operator in Python Programming<\/h4>\n\n\n\n<pre class=\"wp-block-code language-python\"><code>num1 = 12            \nnum2 = 2            \nresult = num1 &amp; num2        \nprint (\"Result  is \", result)\n\nresult = num1 | num2        \nprint (\"Result is \", result)\n\nresult = num1 ^ num2        \nprint (\"Result is \", result)\n\nresult = ~num1           \nprint (\"Result is \", result)\n\nresult = num1 &lt;&lt; 2       \nprint (\"Result is \", result)\n\nresult = num1 >> 2       \nprint (\"Result is \", result)<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Result  is  0\nResult is  14\nResult is  14\nResult is  -13\nResult is  48\nResult is  3<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Python Operators performs a mathematical, relational or logical operation on variables. In this Python Tutorial, learn Type of Operators with examples.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"keywords":[],"class_list":["post-4081","post","type-post","status-publish","format-standard","hentry","category-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Operators - Tutorials Class<\/title>\n<meta name=\"description\" content=\"Python Operators performs a mathematical, relational or logical operation on variables. In this Python Tutorial, learn Type of Operators with examples.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tutorialsclass.com\/python-operators\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Operators - Tutorials Class\" \/>\n<meta property=\"og:description\" content=\"Python Operators performs a mathematical, relational or logical operation on variables. In this Python Tutorial, learn Type of Operators with examples.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tutorialsclass.com\/python-operators\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorials Class\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/tutorialsclass\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-04T18:32:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-03T07:01:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/07\/tutorials-class-logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Tutorials Class\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@TutorialsClass\" \/>\n<meta name=\"twitter:site\" content=\"@TutorialsClass\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tutorials Class\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/tutorialsclass.com\/python-operators\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/tutorialsclass.com\/python-operators\/\"},\"author\":{\"name\":\"Tutorials Class\",\"@id\":\"https:\/\/tutorialsclass.com\/#\/schema\/person\/f7d4f67fc9721ef3ea91cb21aaf89e3e\"},\"headline\":\"Python Operators\",\"datePublished\":\"2019-08-04T18:32:03+00:00\",\"dateModified\":\"2021-02-03T07:01:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/tutorialsclass.com\/python-operators\/\"},\"wordCount\":1124,\"publisher\":{\"@id\":\"https:\/\/tutorialsclass.com\/#organization\"},\"articleSection\":[\"Python Tutorial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tutorialsclass.com\/python-operators\/\",\"url\":\"https:\/\/tutorialsclass.com\/python-operators\/\",\"name\":\"Python Operators - Tutorials Class\",\"isPartOf\":{\"@id\":\"https:\/\/tutorialsclass.com\/#website\"},\"datePublished\":\"2019-08-04T18:32:03+00:00\",\"dateModified\":\"2021-02-03T07:01:52+00:00\",\"description\":\"Python Operators performs a mathematical, relational or logical operation on variables. In this Python Tutorial, learn Type of Operators with examples.\",\"breadcrumb\":{\"@id\":\"https:\/\/tutorialsclass.com\/python-operators\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tutorialsclass.com\/python-operators\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tutorialsclass.com\/python-operators\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tutorialsclass.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn\",\"item\":\"https:\/\/tutorialsclass.com\/learn\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python Tutorial\",\"item\":\"https:\/\/tutorialsclass.com\/learn\/python\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Python Operators\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tutorialsclass.com\/#website\",\"url\":\"https:\/\/tutorialsclass.com\/\",\"name\":\"Tutorials Class\",\"description\":\"Online Tutorials for Beginners\",\"publisher\":{\"@id\":\"https:\/\/tutorialsclass.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tutorialsclass.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/tutorialsclass.com\/#organization\",\"name\":\"Tutorials Class\",\"url\":\"https:\/\/tutorialsclass.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tutorialsclass.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/05\/tutorials-class-logo.png\",\"contentUrl\":\"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/05\/tutorials-class-logo.png\",\"width\":442,\"height\":94,\"caption\":\"Tutorials Class\"},\"image\":{\"@id\":\"https:\/\/tutorialsclass.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/tutorialsclass\",\"https:\/\/x.com\/TutorialsClass\",\"https:\/\/in.pinterest.com\/merientinfotech\/boards\/\",\"https:\/\/www.youtube.com\/channel\/UCzbpQXlqec-bQf1_kwrTuoA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/tutorialsclass.com\/#\/schema\/person\/f7d4f67fc9721ef3ea91cb21aaf89e3e\",\"name\":\"Tutorials Class\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tutorialsclass.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/346276d8e1600eec36df1bf9adcf78bf1eabb87fc0a79250e0565a88809b8f14?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/346276d8e1600eec36df1bf9adcf78bf1eabb87fc0a79250e0565a88809b8f14?s=96&d=mm&r=g\",\"caption\":\"Tutorials Class\"},\"sameAs\":[\"tcadmin\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Operators - Tutorials Class","description":"Python Operators performs a mathematical, relational or logical operation on variables. In this Python Tutorial, learn Type of Operators with examples.","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:\/\/tutorialsclass.com\/python-operators\/","og_locale":"en_US","og_type":"article","og_title":"Python Operators - Tutorials Class","og_description":"Python Operators performs a mathematical, relational or logical operation on variables. In this Python Tutorial, learn Type of Operators with examples.","og_url":"https:\/\/tutorialsclass.com\/python-operators\/","og_site_name":"Tutorials Class","article_publisher":"https:\/\/www.facebook.com\/tutorialsclass","article_published_time":"2019-08-04T18:32:03+00:00","article_modified_time":"2021-02-03T07:01:52+00:00","og_image":[{"width":600,"height":600,"url":"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/07\/tutorials-class-logo.png","type":"image\/png"}],"author":"Tutorials Class","twitter_card":"summary_large_image","twitter_creator":"@TutorialsClass","twitter_site":"@TutorialsClass","twitter_misc":{"Written by":"Tutorials Class","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tutorialsclass.com\/python-operators\/#article","isPartOf":{"@id":"https:\/\/tutorialsclass.com\/python-operators\/"},"author":{"name":"Tutorials Class","@id":"https:\/\/tutorialsclass.com\/#\/schema\/person\/f7d4f67fc9721ef3ea91cb21aaf89e3e"},"headline":"Python Operators","datePublished":"2019-08-04T18:32:03+00:00","dateModified":"2021-02-03T07:01:52+00:00","mainEntityOfPage":{"@id":"https:\/\/tutorialsclass.com\/python-operators\/"},"wordCount":1124,"publisher":{"@id":"https:\/\/tutorialsclass.com\/#organization"},"articleSection":["Python Tutorial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/tutorialsclass.com\/python-operators\/","url":"https:\/\/tutorialsclass.com\/python-operators\/","name":"Python Operators - Tutorials Class","isPartOf":{"@id":"https:\/\/tutorialsclass.com\/#website"},"datePublished":"2019-08-04T18:32:03+00:00","dateModified":"2021-02-03T07:01:52+00:00","description":"Python Operators performs a mathematical, relational or logical operation on variables. In this Python Tutorial, learn Type of Operators with examples.","breadcrumb":{"@id":"https:\/\/tutorialsclass.com\/python-operators\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tutorialsclass.com\/python-operators\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/tutorialsclass.com\/python-operators\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tutorialsclass.com\/"},{"@type":"ListItem","position":2,"name":"Learn","item":"https:\/\/tutorialsclass.com\/learn\/"},{"@type":"ListItem","position":3,"name":"Python Tutorial","item":"https:\/\/tutorialsclass.com\/learn\/python\/"},{"@type":"ListItem","position":4,"name":"Python Operators"}]},{"@type":"WebSite","@id":"https:\/\/tutorialsclass.com\/#website","url":"https:\/\/tutorialsclass.com\/","name":"Tutorials Class","description":"Online Tutorials for Beginners","publisher":{"@id":"https:\/\/tutorialsclass.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tutorialsclass.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/tutorialsclass.com\/#organization","name":"Tutorials Class","url":"https:\/\/tutorialsclass.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tutorialsclass.com\/#\/schema\/logo\/image\/","url":"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/05\/tutorials-class-logo.png","contentUrl":"https:\/\/tutorialsclass.com\/wp-content\/uploads\/2020\/05\/tutorials-class-logo.png","width":442,"height":94,"caption":"Tutorials Class"},"image":{"@id":"https:\/\/tutorialsclass.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/tutorialsclass","https:\/\/x.com\/TutorialsClass","https:\/\/in.pinterest.com\/merientinfotech\/boards\/","https:\/\/www.youtube.com\/channel\/UCzbpQXlqec-bQf1_kwrTuoA"]},{"@type":"Person","@id":"https:\/\/tutorialsclass.com\/#\/schema\/person\/f7d4f67fc9721ef3ea91cb21aaf89e3e","name":"Tutorials Class","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tutorialsclass.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/346276d8e1600eec36df1bf9adcf78bf1eabb87fc0a79250e0565a88809b8f14?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/346276d8e1600eec36df1bf9adcf78bf1eabb87fc0a79250e0565a88809b8f14?s=96&d=mm&r=g","caption":"Tutorials Class"},"sameAs":["tcadmin"]}]}},"_links":{"self":[{"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/posts\/4081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/comments?post=4081"}],"version-history":[{"count":4,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/posts\/4081\/revisions"}],"predecessor-version":[{"id":7030,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/posts\/4081\/revisions\/7030"}],"wp:attachment":[{"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/media?parent=4081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/categories?post=4081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/tags?post=4081"},{"taxonomy":"keywords","embeddable":true,"href":"https:\/\/tutorialsclass.com\/wp-json\/wp\/v2\/keywords?post=4081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}