About 751,000 results
Open links in new tab
  1. How to set python variables to true or false? - Stack Overflow

    I want to set a variable in Python to true or false. But the words true and false are interpreted as undefined variables:

  2. bool () | Python’s Built-in Functions – Real Python

    Reference Python’s Built-in Functions / bool() The built-in bool() function allows you to determine the truth value of any Python object. It returns True or False, based on whether the object is considered …

  3. Python Boolean - GeeksforGeeks

    Jul 23, 2025 · Python Boolean type is one of the built-in data types provided by Python, which represents one of the two values i.e. True or False. Generally, it is used to represent the truth values …

  4. Pythonの真偽値bool型(True, False)と他の型との変換・判定

    May 12, 2025 · Pythonにおいて真偽値(真理値)はbool型のオブジェクトTrueとFalseで表される。比較演算子による比較の結果などはTrue, Falseで返され、if文の条件式などで使われる。 bool型はint …

  5. Python - Convert String Truth values to Boolean - GeeksforGeeks

    Jul 15, 2025 · Converting string truth values like "True" and "False" into their corresponding boolean values in Python is a straightforward yet useful operation. Methods such as dictionaries, direct …

  6. How to set and check a boolean flag in python - Stack Overflow

    Apr 12, 2012 · How to set and check a boolean flag in python Asked 13 years, 11 months ago Modified 8 years, 11 months ago Viewed 86k times

  7. Python数据类型(一):bool布尔类型 - CSDN博客

    Nov 18, 2024 · Python中变量有6大标准数据类型: Number(数字)、String(字符串)、List(列表)、Tuple(元组)、Set(集合)、Dictionary(字典)。 布尔 (bool)是整型的子类型。 一、创 …

  8. 組み込み関数 — Python 3.14.3 ドキュメント

    組み込み関数 ¶ Python インタプリタには数多くの関数と型が組み込まれており、いつでも利用できます。それらをここにアルファベット順に挙げます。

  9. Handle Boolean Arguments with argparse in Python - nkmk note

    May 13, 2025 · In Python, you can manage command-line arguments using either sys.argv or the argparse module. Command line arguments in Python (sys.argv, argparse) While the argparse …

  10. boolean - How to switch True to False in Python - Stack Overflow

    What operation do I need to do to always get a False value to become True or to get a True value to become False? In other words, what do I do to switch the Boolean value of a given variable?