Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1035905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:37:00+00:00 2026-05-16T14:37:00+00:00

Possible Duplicate: Why can't Python handle true/false values as I expect? False = True

  • 0

Possible Duplicate:
Why can't Python handle true/false values as I expect?

False = True should raise an error in this case.

False = True
True == False
True

True + False == True?

if True +  False:
    print True
True

True Again?

if str(True + False) + str(False + False) == '10':
    print True
True

LOL

if True + False + True * (False * True ** True / True - True % True) - (True / True) ** True + True - (False ** True ** True):
    print True, 'LOL'
True LOL

why this is all True?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:37:01+00:00Added an answer on May 16, 2026 at 2:37 pm

    False is just a global variable, you can assign to it. It will, however, break just about everything if you do so.

    Note that this behavior has been removed in python3k

    Python 3.1 (r31:73578, Jun 27 2009, 21:49:46) 
    >>> False = True
      File "<stdin>", line 1
    SyntaxError: assignment to keyword
    

    also, int(False) == 0 and int(True) == 1, so you can do arbitrary arithmetic with them

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Python import MySQLdb error - Mac 10.6 I've tried everything I can
Possible Duplicate: Why can't I handle a KeyboardInterrupt in python? I was playing around
Possible Duplicate: Can I write native iPhone apps using Python this post Can I
Possible Duplicate: Can Python print a function definition? In Javascript, it is possible to
Possible Duplicate: How can I make an EXE file from a Python program? i
Possible Duplicate: Hex to binary in ruby In Python, I can do the following:
Possible Duplicate: Can main function call itself in C++? I found this problem very
Possible Duplicate: Can you animate a height change on a UITableViewCell when selected? This
Possible Duplicate: Can distribute setuptools be used to port packages implemented in python 2
Possible Duplicate: How can I subtract a day from a python date? I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.