{"id":187,"date":"2020-10-04T04:31:32","date_gmt":"2020-10-04T04:31:32","guid":{"rendered":"https:\/\/www.pythontutorial.net\/?page_id=187"},"modified":"2025-03-26T07:05:30","modified_gmt":"2025-03-26T07:05:30","slug":"python-logical-operators","status":"publish","type":"page","link":"https:\/\/www.pythontutorial.net\/python-basics\/python-logical-operators\/","title":{"rendered":"Python Logical Operators"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you&#8217;ll learn about Python logical operators and how to use them to combine multiple conditions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-python-logical-operators'>Introduction to Python logical operators <a href=\"#introduction-to-python-logical-operators\" class=\"anchor\" id=\"introduction-to-python-logical-operators\" title=\"Anchor for Introduction to Python logical operators\">#<\/a><\/h2>\n\n\n\n<p>Sometimes, you may want to check multiple conditions at the same time. To do so, you use logical operators.<\/p>\n\n\n\n<p>Python has three logical operators:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>and<\/code><\/li>\n\n\n\n<li><code>or<\/code><\/li>\n\n\n\n<li><code>not<\/code><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id='the-and-operator'>The and operator <a href=\"#the-and-operator\" class=\"anchor\" id=\"the-and-operator\" title=\"Anchor for The &lt;code&gt;and&lt;\/code&gt; operator\">#<\/a><\/h3>\n\n\n\n<p>The <code>and<\/code> operator checks whether two conditions are both <code>True<\/code> simultaneously:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">a <span class=\"hljs-keyword\">and<\/span> b<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>It returns <code>True<\/code> if both conditions are <code>True<\/code>. And it returns <code>False<\/code> if either the condition <code>a<\/code> or <code>b<\/code> is <code>False<\/code>.<\/p>\n\n\n\n<p>The following example uses the <code>and<\/code> operator to combine two conditions that compare the <code>price<\/code> with numbers:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">price = <span class=\"hljs-number\">9.99<\/span>\nresult = price &gt; <span class=\"hljs-number\">9<\/span> <span class=\"hljs-keyword\">and<\/span> price &lt; <span class=\"hljs-number\">10<\/span>\nprint(result)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/www.pythontutorial.net\/playground\/?q=cHJpY2UgPSA5Ljk5CnJlc3VsdCA9ICBwcmljZSA%2BIDkgYW5kIHByaWNlIDwgMTAKcHJpbnQocmVzdWx0KQ%3D%3D\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">True<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The result is <code>True<\/code> because the <code>price<\/code> is greater than 9 and less than 10.<\/p>\n\n\n\n<p>The following example returns <code>False<\/code> because the <code>price<\/code> isn&#8217;t greater than 10:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">price = <span class=\"hljs-number\">9.99<\/span>\nresult =  price &gt; <span class=\"hljs-number\">10<\/span> <span class=\"hljs-keyword\">and<\/span> price &lt; <span class=\"hljs-number\">20<\/span>\nprint(result)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/www.pythontutorial.net\/playground\/?q=cHJpY2UgPSA5Ljk5CnJlc3VsdCA9IHByaWNlID4gMTAgYW5kIHByaWNlIDwgMjAKcHJpbnQocmVzdWx0KQ%3D%3D\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">False<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this example, the condition <code>price &gt; 10<\/code> returns <code>False<\/code> while the second condition <code>price &lt; 20<\/code> returns <code>True<\/code>.<\/p>\n\n\n\n<p>The following table illustrates the result of the <code>and<\/code> operator when combining two conditions:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>a<\/th><th>b<\/th><th>a and b<\/th><\/tr><\/thead><tbody><tr><td>True<\/td><td>True<\/td><td>True<\/td><\/tr><tr><td>True<\/td><td>False<\/td><td>False<\/td><\/tr><tr><td>False<\/td><td>False<\/td><td>False<\/td><\/tr><tr><td>False<\/td><td>True<\/td><td>False<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The condition <code>a<\/code> and <code>b<\/code> only returns <code>True<\/code> if both are <code>True<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='the-or-operator'>The or operator <a href=\"#the-or-operator\" class=\"anchor\" id=\"the-or-operator\" title=\"Anchor for The or operator\">#<\/a><\/h2>\n\n\n\n<p>Similar to the <code>and<\/code> operator, the <code>or<\/code> operator checks multiple conditions. But it returns <code>True<\/code> when either or both individual conditions are <code>True<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">a <span class=\"hljs-keyword\">or<\/span> b<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The following table illustrates the result of the <code>or<\/code> operator when combining two conditions:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>a<\/th><th>b<\/th><th>a or b<\/th><\/tr><\/thead><tbody><tr><td>True<\/td><td>True<\/td><td>True<\/td><\/tr><tr><td>True<\/td><td>False<\/td><td>True<\/td><\/tr><tr><td>False<\/td><td>True <\/td><td>True<\/td><\/tr><tr><td>False<\/td><td>False<\/td><td>False<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The <code>or<\/code> operator returns <code>False<\/code> only when both conditions are <code>False<\/code>.<\/p>\n\n\n\n<p>The following example shows how to use the <code>or<\/code> operator:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">price = <span class=\"hljs-number\">9.99<\/span>\nresult =  price &gt; <span class=\"hljs-number\">10<\/span> <span class=\"hljs-keyword\">or<\/span> price &lt; <span class=\"hljs-number\">20<\/span>\nprint(result)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/www.pythontutorial.net\/playground\/?q=cHJpY2UgPSA5Ljk5CnJlc3VsdCA9ICBwcmljZSA%2BIDEwIG9yIHByaWNlIDwgMjAKcHJpbnQocmVzdWx0KQ%3D%3D\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>In this example, the <code>price &lt; 20<\/code> returns <code>True<\/code>, therefore, the whole expression returns <code>True<\/code>.<\/p>\n\n\n\n<p>The following example returns <code>False<\/code> because both conditions evaluate to <code>False<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">price = <span class=\"hljs-number\">9.99<\/span>\nresult =  price &gt; <span class=\"hljs-number\">10<\/span> <span class=\"hljs-keyword\">or<\/span> price &lt; <span class=\"hljs-number\">5<\/span>\nprint(result)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/www.pythontutorial.net\/playground\/?q=cHJpY2UgPSA5Ljk5CnJlc3VsdCA9ICBwcmljZSA%2BIDEwIG9yIHByaWNlIDwgNQpwcmludChyZXN1bHQp\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='the-not-operator'>The not operator <a href=\"#the-not-operator\" class=\"anchor\" id=\"the-not-operator\" title=\"Anchor for The not operator\">#<\/a><\/h2>\n\n\n\n<p>The <code>not<\/code> operator applies to one condition. And it reverses the result of that condition, <code>True<\/code> becomes <code>False<\/code> and <code>False<\/code> becomes <code>True<\/code>.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\"><span class=\"hljs-keyword\">not<\/span> a<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>If the condition is <code>True<\/code>, the <code>not<\/code> operator returns <code>False<\/code> and vice versa.<\/p>\n\n\n\n<p>The following table illustrates the result of the <code>not<\/code> operator:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>a<\/th><th>not a<\/th><\/tr><\/thead><tbody><tr><td>True<\/td><td>False<\/td><\/tr><tr><td>False<\/td><td>True<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>The following example uses the <code>not<\/code> operator. Since the <code>price &gt; 10<\/code> returns <code>False<\/code>, the <code>not price &gt; 10<\/code> returns <code>True<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">price = <span class=\"hljs-number\">9.99<\/span>\nresult = <span class=\"hljs-keyword\">not<\/span> price &gt; <span class=\"hljs-number\">10<\/span>\nprint(result)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/www.pythontutorial.net\/playground\/?q=cHJpY2UgPSA5Ljk5CnJlc3VsdCA9ICBub3QgcHJpY2UgPiAxMApwcmludChyZXN1bHQp\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">True<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Here is another example that combines the <code>not<\/code> and the <code>and<\/code> operators:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"Python\" data-shcb-language-slug=\"python\"><span><code class=\"hljs language-python\">price = <span class=\"hljs-number\">9.99<\/span>\nresult =  <span class=\"hljs-keyword\">not<\/span> (price &gt; <span class=\"hljs-number\">5<\/span> <span class=\"hljs-keyword\">and<\/span> price &lt; <span class=\"hljs-number\">10<\/span>)\nprint(result)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Python<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">python<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/www.pythontutorial.net\/playground\/?q=cHJpY2UgPSA5Ljk5CnJlc3VsdCA9ICBub3QgKHByaWNlID4gNSBhbmQgcHJpY2UgPCAxMCkKcHJpbnQocmVzdWx0KQ%3D%3D\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">False<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this example, Python evaluates the conditions based on the following order:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, <code>(price > 5 and price &lt; 10)<\/code> evaluates to <code>True<\/code>.<\/li>\n\n\n\n<li>Second, <code>not True<\/code> evaluates to <code>False<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>This leads to an important concept called <strong>precedence<\/strong> of logical operators.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id='precedence-of-logical-operators'>Precedence of Logical Operators <a href=\"#precedence-of-logical-operators\" class=\"anchor\" id=\"precedence-of-logical-operators\" title=\"Anchor for Precedence of Logical Operators\">#<\/a><\/h3>\n\n\n\n<p>When you mix the logical operators in an expression, Python will evaluate them in the order which is called the operator precedence.<\/p>\n\n\n\n<p>The following shows the precedence of the <code>not<\/code>, <code>and<\/code>, and <code>or<\/code> operators:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>Operator<\/th><th>Precedence<\/th><\/tr><tr><td>not<\/td><td>High<\/td><\/tr><tr><td>and<\/td><td>Medium<\/td><\/tr><tr><td>or<\/td><td>Low<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Based on these precedences, Python will group the operands for the operator with the highest precedence first, then group the operands for the operator with the lower precedence, and so on. <\/p>\n\n\n\n<p>In case an expression has several logical operators with the same precedence, Python will evaluate them from the left to right:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code>a or b and c<\/code><\/td><td>means<\/td><td><code>a or (b and c)<\/code><\/td><\/tr><tr><td><code>a and b or c and d<\/code><\/td><td>means<\/td><td><code>(a and b) or (c and d)<\/code><\/td><\/tr><tr><td><code>a and b and c or d<\/code><\/td><td>means<\/td><td><code>((a and b) and c) or d<\/code><\/td><\/tr><tr><td><code>not a and b or c<\/code><\/td><td>means<\/td><td><code>((not a) and b) or c<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id='summary'>Summary <a href=\"#summary\" class=\"anchor\" id=\"summary\" title=\"Anchor for Summary\">#<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use logical operators to combine multiple conditions.<\/li>\n\n\n\n<li>Python has three logical operators: <code>and<\/code>, <code>or<\/code>, and <code>not<\/code>.<\/li>\n\n\n\n<li>The precedence of the logical operator from the highest to lowest: <code>not<\/code>, <code>and<\/code>, and <code>or<\/code>.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id='quiz'>Quiz <a href=\"#quiz\" class=\"anchor\" id=\"quiz\" title=\"Anchor for Quiz\">#<\/a><\/h2>\n\n\n\n<iframe loading=\"lazy\"\n  name=\"quiz\"\n  src=\"\/quiz\/?quiz=logical-operators\"\n  height=\"700\"\n  width=\"600\"\n  class=\"iframe\"\n><\/iframe>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful ?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"187\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/python-basics\/python-logical-operators\/\"\n\t\t\t\tdata-post-title=\"Python Logical Operators\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"187\"\n\t\t\t\tdata-post-url=\"https:\/\/www.pythontutorial.net\/python-basics\/python-logical-operators\/\"\n\t\t\t\tdata-post-title=\"Python Logical Operators\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\t\t\t<input type=\"button\" name=\"wth-submit\" class=\"wth-btn wth-btn-submit\" id=\"wth-submit\" \/>\n\t\t\t<input type=\"button\" class=\"wth-btn wth-btn-cancel\" value=\"Cancel\" \/>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you&#8217;ll learn about Python logical operators and how to use them to combine multiple conditions.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":37,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-187","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":0,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/187\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/pages\/37"}],"wp:attachment":[{"href":"https:\/\/www.pythontutorial.net\/wp-json\/wp\/v2\/media?parent=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}