---
title: "Meaning & Key Takeaway of: Boolean and and or operators return a…"
description: "\"“Boolean and and or operators return a true or false object in Python, not the values True or False.”\" — Mark Lutz"
image: "https://sms4smile.com/quotes/i/4f0/mark-lutz-25814_true-or-false_boolean-and-and-or-operators-return-a-tr_555508.jpg"
---

#  Boolean and and or operators return a true or false object…

![“Boolean and and or operators return a true or false object in Python, not the values True or False.” quote by Mark Lutz](https://sms4smile.com/quotes/i/4f0/mark-lutz-25814_true-or-false_boolean-and-and-or-operators-return-a-tr_555508.jpg)   [Download](https://sms4smile.com/quotes/i/4f0/mark-lutz-25814_true-or-false_boolean-and-and-or-operators-return-a-tr_555508.jpg) [Open image](https://sms4smile.com/quotes/i/4f0/mark-lutz-25814_true-or-false_boolean-and-and-or-operators-return-a-tr_555508.jpg)

> ““Boolean and and or operators return a true or false object in Python, not the values True or False.””

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

## About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

Clarifies that logical operators return Boolean objects, not literal True/False values.

**In simple terms:** Python booleans are objects.

Key Takeaway

Understand Python's truth values.

Themes

programming Python logic

Mood

technical educational

Type

informative clarifying

When to use this quote

- debugging
- teaching
- code reviews

Key Concepts

boolean logic type system

Questions to Reflect On

- How does Python treat truthy and falsy values?
- When should you explicitly compare to True?

A Different Perspective

Confusing booleans with literals can cause subtle bugs.

★ ★ ★ ★ ★   No ratings yet

## Related quotes

> [“Booleans are named after George Boole, an English mathematician who invented Boolean logic. You’ll”](https://sms4smile.com/quotes/eric-freeman/booleans-are-named-after-george-boole-an-english-mathematician-who/)

[Eric Freeman](https://sms4smile.com/quotes/author/eric-freeman/)

> [“forloop.first is a Boolean value set to True if this is the first time through the loop. This is convenient for special-casing:”](https://sms4smile.com/quotes/nigel-george/forloop-first-is-a-boolean-value-set-to-true-if-this-is-the-first/)

[Nigel George](https://sms4smile.com/quotes/author/nigel-george/)

> [“boolean logic is often too primitive to try and express what we're trying to express.”](https://sms4smile.com/quotes/anonymous/boolean-logic-is-often-too-primitive-to-try-and-express-what-we-re/)

[Anonymous](https://sms4smile.com/quotes/author/anonymous/)

> [The question of relevance comes before that of truth, because to ask whether a statement is true or false presupposes that it is relevant…](https://sms4smile.com/quotes/david-bohm/the-question-of-relevance-comes-before-that-of-truth-because-to-ask/)

[David Bohm](https://sms4smile.com/quotes/author/david-bohm/)

> [Its guilt therefore in these cases, is not to be measure by its effects on the happiness of mankind; nor is it to be…](https://sms4smile.com/quotes/william-wilberforce/its-guilt-therefore-in-these-cases-is-not-to-be-measure-by-its/)

[William Wilberforce](https://sms4smile.com/quotes/author/william-wilberforce/)

> [Yeah I'm a put my shades on Uh I live it up like these are my last days If time is money, I'm an…](https://sms4smile.com/quotes/lil-wayne/yeah-i-m-a-put-my-shades-on-uh-i-live-it-up-like-these-are-my-last/)

[Lil Wayne](https://sms4smile.com/quotes/author/lil-wayne/)

> [All the martyrs in the history of the world are not sufficient to establish the correctness of an opinion. Martyrdom, as a rule, establishes…](https://sms4smile.com/quotes/robert-green-ingersoll/all-the-martyrs-in-the-history-of-the-world-are-not-sufficient-to/)

[Robert Green Ingersoll](https://sms4smile.com/quotes/author/robert-green-ingersoll/)

> [You can talk about a caption underneath a photograph being true or false, because there is a linguistic element. You can claim that a…](https://sms4smile.com/quotes/errol-morris/you-can-talk-about-a-caption-underneath-a-photograph-being-true-or/)

[Errol Morris](https://sms4smile.com/quotes/author/errol-morris/)

> [There are no hard distinctions between what is real and what is unreal, nor between what is true and what is false. A thing…](https://sms4smile.com/quotes/harold-pinter/there-are-no-hard-distinctions-between-what-is-real-and-what-is/)

[Harold Pinter](https://sms4smile.com/quotes/author/harold-pinter/)

> [The statesman cannot govern without stability of belief, true or false.](https://sms4smile.com/quotes/george-bernard-shaw/the-statesman-cannot-govern-without-stability-of-belief-true-or-false/)

[George Bernard Shaw](https://sms4smile.com/quotes/author/george-bernard-shaw/)

> [True or False? Their are so many girls that I love, I just have to choose one! True! I cannot date 50,000,000,000 girls akak…](https://sms4smile.com/quotes/dub-tepper/true-or-false-their-are-so-many-girls-that-i-love-i-just-have-to/)

DUB$TEPPER

> [The wrong question to ask of a myth is whether it is true or false. The right question is whether it is living or…](https://sms4smile.com/quotes/richard-holloway/the-wrong-question-to-ask-of-a-myth-is-whether-it-is-true-or-false/)

[Richard Holloway](https://sms4smile.com/quotes/author/richard-holloway/)

> [What signifies protesting so against flattery when a person speaks well of one, it must either be true or false, you know if true,…](https://sms4smile.com/quotes/samuel-johnson/what-signifies-protesting-so-against-flattery-when-a-person-speaks/)

[Samuel Johnson](https://sms4smile.com/quotes/author/samuel-johnson/)

> [“…the war about the genocide was truly a postmodern war: a battle between those who believed that because the realities we inhabit are constructs…](https://sms4smile.com/quotes/philip-gourevitch/the-war-about-the-genocide-was-truly-a-postmodern-war-a-battle/)

[Philip Gourevitch](https://sms4smile.com/quotes/author/philip-gourevitch/)

> [“You have information for us? No, you have all the information you need in your head, what you want, what you need, is a…](https://sms4smile.com/quotes/v/you-have-information-for-us-no-you-have-all-the-information-you-need/)

V

## More by Mark Lutz

> [“and indent all but the simplest of blocks.”](https://sms4smile.com/quotes/mark-lutz/and-indent-all-but-the-simplest-of-blocks/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“when in Pythonland, do as Pythonistas do, not as C programmers do.”](https://sms4smile.com/quotes/mark-lutz/when-in-pythonland-do-as-pythonistas-do-not-as-c-programmers-do/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“you can do everything in Python that you can in Perl, but”](https://sms4smile.com/quotes/mark-lutz/you-can-do-everything-in-python-that-you-can-in-perl-but/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“Interestingly, the iteration protocol is even more pervasive in Python today than the examples so far have demonstrated — essentially everything in Python’s built-in…](https://sms4smile.com/quotes/mark-lutz/interestingly-the-iteration-protocol-is-even-more-pervasive-in-python/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“\_\_next\_\_ raises a built-in StopIteration exception at end-of-file”](https://sms4smile.com/quotes/mark-lutz/next-raises-a-built-in-stopiteration-exception-at-end-of-file/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“Besides directory paths on Windows, raw strings are also commonly used for regular expressions”](https://sms4smile.com/quotes/mark-lutz/besides-directory-paths-on-windows-raw-strings-are-also-commonly-used/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“absolutes in performance benchmarks are as elusive as consensus in open source projects!”](https://sms4smile.com/quotes/mark-lutz/absolutes-in-performance-benchmarks-are-as-elusive-as-consensus-in/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“The name used as the assignment target in a for header line is usually a (possibly new) variable in the scope where the for…](https://sms4smile.com/quotes/mark-lutz/the-name-used-as-the-assignment-target-in-a-for-header-line-is/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“give people a tool, and they’ll code for a day; teach them how to build tools, and they’ll code for a lifetime. This”](https://sms4smile.com/quotes/mark-lutz/give-people-a-tool-and-they-ll-code-for-a-day-teach-them-how-to-build/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [ “This description requires elaboration when the value and the slice being assigned overlap: L\[2:5\]=L\[3:6\], for instance, works fine because the value to be inserted… ](https://sms4smile.com/quotes/mark-lutz/this-description-requires-elaboration-when-the-value-and-the-slice/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“We met the list comprehension briefly in Chapter 4. Syntactically, its syntax is derived from a construct in set theory notation that applies an operation…](https://sms4smile.com/quotes/mark-lutz/we-met-the-list-comprehension-briefly-in-chapter-4-syntactically-its/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“In Pythons 3.3 and 2.7, you can get help for a module you have not imported by quoting the module’s name as a string…](https://sms4smile.com/quotes/mark-lutz/in-pythons-3-3-and-2-7-you-can-get-help-for-a-module-you-have-not/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“a raw string cannot end in an odd number of backslashes.”](https://sms4smile.com/quotes/mark-lutz/a-raw-string-cannot-end-in-an-odd-number-of-backslashes/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“In Python, practicality often beats aesthetics.”](https://sms4smile.com/quotes/mark-lutz/in-python-practicality-often-beats-aesthetics/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“One of the first questions that bewildered beginners often ask is: how do I find information on all the built-in tools?”](https://sms4smile.com/quotes/mark-lutz/one-of-the-first-questions-that-bewildered-beginners-often-ask-is-how/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

[Explore all 22 Mark Lutz quotes ](https://sms4smile.com/quotes/author/mark-lutz/)

## More True or false quotes

> [“You have information for us? No, you have all the information you need in your head, what you want, what you need, is a…](https://sms4smile.com/quotes/v/you-have-information-for-us-no-you-have-all-the-information-you-need/)

V

> [“…the war about the genocide was truly a postmodern war: a battle between those who believed that because the realities we inhabit are constructs…](https://sms4smile.com/quotes/philip-gourevitch/the-war-about-the-genocide-was-truly-a-postmodern-war-a-battle/)

[Philip Gourevitch](https://sms4smile.com/quotes/author/philip-gourevitch/)

> [What signifies protesting so against flattery when a person speaks well of one, it must either be true or false, you know if true,…](https://sms4smile.com/quotes/samuel-johnson/what-signifies-protesting-so-against-flattery-when-a-person-speaks/)

[Samuel Johnson](https://sms4smile.com/quotes/author/samuel-johnson/)

> [The wrong question to ask of a myth is whether it is true or false. The right question is whether it is living or…](https://sms4smile.com/quotes/richard-holloway/the-wrong-question-to-ask-of-a-myth-is-whether-it-is-true-or-false/)

[Richard Holloway](https://sms4smile.com/quotes/author/richard-holloway/)

> [True or False? Their are so many girls that I love, I just have to choose one! True! I cannot date 50,000,000,000 girls akak…](https://sms4smile.com/quotes/dub-tepper/true-or-false-their-are-so-many-girls-that-i-love-i-just-have-to/)

DUB$TEPPER

> [The statesman cannot govern without stability of belief, true or false.](https://sms4smile.com/quotes/george-bernard-shaw/the-statesman-cannot-govern-without-stability-of-belief-true-or-false/)

[George Bernard Shaw](https://sms4smile.com/quotes/author/george-bernard-shaw/)

> [There are no hard distinctions between what is real and what is unreal, nor between what is true and what is false. A thing…](https://sms4smile.com/quotes/harold-pinter/there-are-no-hard-distinctions-between-what-is-real-and-what-is/)

[Harold Pinter](https://sms4smile.com/quotes/author/harold-pinter/)

> [You can talk about a caption underneath a photograph being true or false, because there is a linguistic element. You can claim that a…](https://sms4smile.com/quotes/errol-morris/you-can-talk-about-a-caption-underneath-a-photograph-being-true-or/)

[Errol Morris](https://sms4smile.com/quotes/author/errol-morris/)

> [All the martyrs in the history of the world are not sufficient to establish the correctness of an opinion. Martyrdom, as a rule, establishes…](https://sms4smile.com/quotes/robert-green-ingersoll/all-the-martyrs-in-the-history-of-the-world-are-not-sufficient-to/)

[Robert Green Ingersoll](https://sms4smile.com/quotes/author/robert-green-ingersoll/)

> [Yeah I'm a put my shades on Uh I live it up like these are my last days If time is money, I'm an…](https://sms4smile.com/quotes/lil-wayne/yeah-i-m-a-put-my-shades-on-uh-i-live-it-up-like-these-are-my-last/)

[Lil Wayne](https://sms4smile.com/quotes/author/lil-wayne/)

> [Its guilt therefore in these cases, is not to be measure by its effects on the happiness of mankind; nor is it to be…](https://sms4smile.com/quotes/william-wilberforce/its-guilt-therefore-in-these-cases-is-not-to-be-measure-by-its/)

[William Wilberforce](https://sms4smile.com/quotes/author/william-wilberforce/)

> [The question of relevance comes before that of truth, because to ask whether a statement is true or false presupposes that it is relevant…](https://sms4smile.com/quotes/david-bohm/the-question-of-relevance-comes-before-that-of-truth-because-to-ask/)

[David Bohm](https://sms4smile.com/quotes/author/david-bohm/)

> [But lest I should mislead any when I have my own head and obey my whims, let me remind the reader that I am…](https://sms4smile.com/quotes/ralph-waldo-emerson/but-lest-i-should-mislead-any-when-i-have-my-own-head-and-obey-my/)

[Ralph Waldo Emerson](https://sms4smile.com/quotes/author/ralph-waldo-emerson/)

> [Aphorisms are not true or false, but pointed or flat.](https://sms4smile.com/quotes/mason-cooley/aphorisms-are-not-true-or-false-but-pointed-or-flat/)

[Mason Cooley](https://sms4smile.com/quotes/author/mason-cooley/)

> [I Been Gone Too Long True Or False Right Or Wrong... Hello T.Y. Welcome Home.!](https://sms4smile.com/quotes/lil-wayne/i-been-gone-too-long-true-or-false-right-or-wrong-hello-t-y-welcome/)

[Lil Wayne](https://sms4smile.com/quotes/author/lil-wayne/)

Browse all 132 True or false quotes

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "“Boolean and and or operators return a true or false object in Python, not the values True or False.”",
            "creator": {
                "@type": "Person",
                "name": "Mark Lutz"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/mark-lutz/boolean-and-and-or-operators-return-a-true-or-false-object-in-python/",
            "about": {
                "@type": "Thing",
                "name": "True or false"
            },
            "@id": "https://sms4smile.com/quotes/mark-lutz/boolean-and-and-or-operators-return-a-true-or-false-object-in-python/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/4f0/mark-lutz-25814_true-or-false_boolean-and-and-or-operators-return-a-tr_555508.jpg",
                "contentUrl": "https://sms4smile.com/quotes/i/4f0/mark-lutz-25814_true-or-false_boolean-and-and-or-operators-return-a-tr_555508.jpg",
                "url": "https://sms4smile.com/quotes/i/4f0/mark-lutz-25814_true-or-false_boolean-and-and-or-operators-return-a-tr_555508.jpg",
                "width": 1080,
                "height": 1080,
                "caption": "“Boolean and and or operators return a true or false object in Python, not the values True or False.” — Mark Lutz",
                "creditText": "SMS4Smile Quotes",
                "creator": {
                    "@id": "https://sms4smile.com/quotes/#organization"
                }
            }
        },
        {
            "@type": "BreadcrumbList",
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "name": "Home",
                    "item": "https://sms4smile.com/"
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "name": "Quotes",
                    "item": "https://sms4smile.com/quotes/"
                },
                {
                    "@type": "ListItem",
                    "position": 3,
                    "name": "Mark Lutz",
                    "item": "https://sms4smile.com/quotes/author/mark-lutz/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "“Boolean and and or operators return...",
                    "item": "https://sms4smile.com/quotes/mark-lutz/boolean-and-and-or-operators-return-a-true-or-false-object-in-python/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/mark-lutz/boolean-and-and-or-operators-return-a-true-or-false-object-in-python/#breadcrumb"
        },
        {
            "@type": "WebSite",
            "@id": "https://sms4smile.com/quotes/#website",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "publisher": {
                "@id": "https://sms4smile.com/quotes/#organization"
            }
        },
        {
            "@type": "Organization",
            "@id": "https://sms4smile.com/quotes/#organization",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "logo": {
                "@type": "ImageObject",
                "url": "https://sms4smile.com/quotes/wp-content/themes/sq/assets/icons/icon-512.png",
                "width": 512,
                "height": 512
            }
        }
    ]
}
```
