<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ideawaza.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=152.43.0.0%2F16</id>
	<title>IdeaWazaWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://ideawaza.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=152.43.0.0%2F16"/>
	<link rel="alternate" type="text/html" href="https://ideawaza.com/wiki/Special:Contributions/152.43.0.0/16"/>
	<updated>2026-09-29T22:26:00Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://ideawaza.com/index.php?title=Truth_and_flow_control_in_Python&amp;diff=38201</id>
		<title>Truth and flow control in Python</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Truth_and_flow_control_in_Python&amp;diff=38201"/>
		<updated>2007-02-24T16:59:47Z</updated>

		<summary type="html">&lt;p&gt;152.43.1.4: woot.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Boolean Expressions==&lt;br /&gt;
Python has a Boolean type. The two values for this type are True and False. Note the capitalization: the first letter must be capitalized. Most text editors, including IDLE, will highlight True and False when properly capitalized. &lt;br /&gt;
&lt;br /&gt;
===The bool() Function===&lt;br /&gt;
If you need to convert something into a boolean value, use the bool() function. For example:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(1)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(0)&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(500)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(-1)&lt;br /&gt;
 True&lt;br /&gt;
In Python, the integer 0 evaluates to False. All other integers will evaluate to True. As a general rule, try to avoid using Floating Point numbers in boolean expressions: use the int() operator to turn them into integers first.&lt;br /&gt;
&lt;br /&gt;
Strings behave similarly: an empty string evaluates to False, all other strings evaluate to True.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;Hello World!&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;&amp;quot;)&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;True&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;False&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;0&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
Note that what is &#039;&#039;in&#039;&#039; the string does not matter: It can be &amp;quot;0&amp;quot;, &amp;quot;False&amp;quot; or &amp;quot;ReallyReallyFalse&amp;quot;: Everything that is not simply an empty string will evaluate to true. &lt;br /&gt;
&lt;br /&gt;
==Comparison Operators==&lt;br /&gt;
Python has a number of built-in comparison operators. They are very versatile and can often be used across data types. &lt;br /&gt;
=== Equality===&lt;br /&gt;
The Python operator for Equality is ==. Let&#039;s try it out:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; 1==1&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; &amp;quot;1&amp;quot;==&amp;quot;1&amp;quot;&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; 2+4 == 24&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; &amp;quot;2&amp;quot;+&amp;quot;4&amp;quot; == &amp;quot;24&amp;quot;&lt;br /&gt;
 True&lt;br /&gt;
&lt;br /&gt;
==Flow Control==&lt;br /&gt;
Now that you know all these great ways to work with booleans, let&#039;s use them!&lt;br /&gt;
&lt;br /&gt;
===If, Elif, and Else==&lt;br /&gt;
Python uses a simple keyword called &amp;quot;if&amp;quot; to determine &#039;&#039;if&#039;&#039; it should execute a section of code. You can tell which lines are in this section by the level of indentation. The general format of if goes like this:&lt;br /&gt;
 if [Boolean Expression]:&lt;br /&gt;
     some code&lt;br /&gt;
 rest of code&lt;br /&gt;
This allows for very simple logic. What if you want to have two options, similar to &amp;quot;case&amp;quot; in other languages? Instead of Case, python uses &amp;quot;elif&amp;quot;. &lt;br /&gt;
 if [Boolean Expression]:&lt;br /&gt;
     code&lt;br /&gt;
 elif [Boolean Expression]:&lt;br /&gt;
     More code&lt;br /&gt;
 else:&lt;br /&gt;
     Even more code&lt;br /&gt;
 rest of program&lt;br /&gt;
One thing that&#039;s important to realize is that if the boolean expression for the first &amp;quot;if&amp;quot; is True, nothing in the elif section will execute, nor will anything in the else section. If there are multiple things that could evaluate to True, use multiple if statements. &lt;br /&gt;
&lt;br /&gt;
That code sample also introduced the &amp;quot;else&amp;quot; statement. Else gets executed if the &amp;quot;if&amp;quot; statement&#039;s boolean expression, and the boolean expressions for all elifs (if there are any), evaluate to False.&lt;br /&gt;
&lt;br /&gt;
So, how about some actual code? Here&#039;s a simple program; try entering this into IDLE and running it. &lt;br /&gt;
 name = raw_input(&amp;quot;What is your name?&amp;quot;)&lt;br /&gt;
 if name == &amp;quot;&amp;quot;:&lt;br /&gt;
     print &amp;quot;Hey! You didn&#039;t enter a name!&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 elif name == &amp;quot;spam&amp;quot; or name == &amp;quot;eggs&amp;quot;:&lt;br /&gt;
     print &amp;quot;A moose once bit my sister!&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 else:&lt;br /&gt;
     print &amp;quot;Nice to meet you, %s.&amp;quot; % name&lt;br /&gt;
===While===&lt;br /&gt;
While is our first example of a loop. While evaluates a boolean expression, and if that expression is True, it runs some section of code. It then re-evaluates that boolean expression: if it still evaluates to True, then it runs again. It keeps running - possibly forever! - until that loop evaluates to False, at which point the program continues with whatever comes after the while loop. &lt;br /&gt;
&lt;br /&gt;
Let&#039;s take our previous example. That program ran once, and even if nothing was entered, it was done. Let&#039;s suppose we instead want a program that &amp;quot;won&#039;t take no&amp;quot; for an answer: We&#039;ll use a while loop to make the prompt show up again and again until we get some response:&lt;br /&gt;
 name == raw_input(&amp;quot;What is your name?&amp;quot;)&lt;br /&gt;
 while name == &amp;quot;&amp;quot;:&lt;br /&gt;
     print &amp;quot;Hey! You didn&#039;t enter a name!&amp;quot;&lt;br /&gt;
     name = raw_input(&amp;quot;Okay, REALLY tell me your name this time:&amp;quot;)&lt;br /&gt;
 if name == &amp;quot;spam&amp;quot; or name == &amp;quot;eggs&amp;quot;:&lt;br /&gt;
     print &amp;quot;A moose once bit my sister!&amp;quot;&lt;br /&gt;
 else:&lt;br /&gt;
     print &amp;quot;Nice to meet you, %s&amp;quot; % name&lt;br /&gt;
That&#039;s even better. However, there are a couple of things I don&#039;t like about it. First, I don&#039;t like that first boolean expression. After all, we know that:&lt;br /&gt;
 bool(&amp;quot;&amp;quot;)==False&lt;br /&gt;
Therefore, wouldn&#039;t it make more sense just to test if name is False than to test if it&#039;s &#039;&#039;True&#039;&#039; that it&#039;s &#039;&#039;equal&#039;&#039; to &amp;quot;&amp;quot;?&lt;br /&gt;
 while bool(name) == False:&lt;br /&gt;
And do we really want to test if it&#039;s True than to Test that it&#039;s &#039;&#039;True&#039;&#039; that it&#039;s equal to &#039;&#039;False&#039;&#039;?&lt;br /&gt;
 while not bool(name):&lt;br /&gt;
That&#039;s right! Python has a &amp;quot;not&amp;quot; keyword, which acts a lot like ! in other languages. Python as ! too, but not is often clearer when working with long boolean expressions. &lt;br /&gt;
&lt;br /&gt;
We&#039;re missing one last thing: whatever comes after the &amp;quot;while&amp;quot; is automatically evaluated as a boolean expression. That means that in many cases (this one included) we can leave out the &amp;quot;bool().&amp;quot; (There will still be cases where it&#039;s needed, though, so remember that it exists!)&lt;br /&gt;
 while not name: # This is exactly the same as &#039;while name == &amp;quot;&amp;quot;:&#039;, but a lot clearer. &lt;br /&gt;
Okay, good? Cool. It&#039;s time to add a new feature: The for loop.&lt;br /&gt;
===For concept in lesson: learn(concept)===&lt;br /&gt;
The for loop is... (to be continued)&lt;/div&gt;</summary>
		<author><name>152.43.1.4</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Truth_and_flow_control_in_Python&amp;diff=38200</id>
		<title>Truth and flow control in Python</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Truth_and_flow_control_in_Python&amp;diff=38200"/>
		<updated>2007-02-24T15:50:55Z</updated>

		<summary type="html">&lt;p&gt;152.43.1.4: fix a couple typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Boolean Expressions==&lt;br /&gt;
Python has a Boolean type. The two values for this type are True and False. Note the capitalization: the first letter must be capitalized. Most text editors, including IDLE, will highlight True and False when properly capitalized. &lt;br /&gt;
&lt;br /&gt;
===The bool() Function===&lt;br /&gt;
If you need to convert something into a boolean value, use the bool() function. For example:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(1)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(0)&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(500)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(-1)&lt;br /&gt;
 True&lt;br /&gt;
In Python, the integer 0 evaluates to False. All other integers will evaluate to True. As a general rule, try to avoid using Floating Point numbers in boolean expressions: use the int() operator to turn them into integers first.&lt;br /&gt;
&lt;br /&gt;
Strings behave similarly: an empty string evaluates to False, all other strings evaluate to True.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;Hello World!&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;&amp;quot;)&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;True&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;False&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;0&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
Note that what is &#039;&#039;in&#039;&#039; the string does not matter: It can be &amp;quot;0&amp;quot;, &amp;quot;False&amp;quot; or &amp;quot;ReallyReallyFalse&amp;quot;: Everything that is not simply an empty string will evaluate to true. &lt;br /&gt;
&lt;br /&gt;
==Comparison Operators==&lt;br /&gt;
Python has a number of built-in comparison operators. They are very versatile and can often be used across data types. &lt;br /&gt;
=== Equality===&lt;br /&gt;
The Python operator for Equality is ==. Let&#039;s try it out:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; 1==1&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; &amp;quot;1&amp;quot;==&amp;quot;1&amp;quot;&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; 2+4 == 24&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; &amp;quot;2&amp;quot;+&amp;quot;4&amp;quot; == &amp;quot;24&amp;quot;&lt;br /&gt;
 True&lt;br /&gt;
&lt;br /&gt;
==Flow Control==&lt;br /&gt;
Now that you know all these great ways to work with booleans, let&#039;s use them! Python uses a simple keyword called &amp;quot;if&amp;quot; to determine &#039;&#039;if&#039;&#039; it should execute a section of code. You can tell which lines are in this section by the level of indentation. The general format of if goes like this:&lt;br /&gt;
 if [Boolean Expression]:&lt;br /&gt;
     some code&lt;br /&gt;
 rest of code&lt;br /&gt;
This allows for very simple logic. What if you want to have two options, similar to &amp;quot;case&amp;quot; in other languages? Instead of Case, python uses &amp;quot;elif&amp;quot;. &lt;br /&gt;
 if [Boolean Expression]:&lt;br /&gt;
     code&lt;br /&gt;
 elif [Boolean Expression]:&lt;br /&gt;
     More code&lt;br /&gt;
 else:&lt;br /&gt;
     Even more code&lt;br /&gt;
 rest of program&lt;br /&gt;
One thing that&#039;s important to realize is that if the boolean expression for the first &amp;quot;if&amp;quot; is True, nothing in the elif section will execute, nor will anything in the else section. If there are multiple things that could evaluate to True, use multiple if statements. &lt;br /&gt;
&lt;br /&gt;
That code sample also introduced the &amp;quot;else&amp;quot; statement. Else gets executed if the &amp;quot;if&amp;quot; statement&#039;s boolean expression, and the boolean expressions for all elifs (if there are any), evaluate to False.&lt;br /&gt;
&lt;br /&gt;
So, how about some actual code? Here&#039;s a simple program; try entering this into IDLE and running it. &lt;br /&gt;
 name = raw_input(&amp;quot;What is your name?&amp;quot;)&lt;br /&gt;
 if name == &amp;quot;&amp;quot;:&lt;br /&gt;
     print &amp;quot;Hey! You didn&#039;t enter a name!&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 elif name == &amp;quot;spam&amp;quot; or name == &amp;quot;eggs&amp;quot;:&lt;br /&gt;
     print &amp;quot;A moose once bit my sister!&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 else:&lt;br /&gt;
     print &amp;quot;Nice to meet you, %s.&amp;quot; % name&lt;/div&gt;</summary>
		<author><name>152.43.1.4</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Truth_and_flow_control_in_Python&amp;diff=38199</id>
		<title>Truth and flow control in Python</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Truth_and_flow_control_in_Python&amp;diff=38199"/>
		<updated>2007-02-24T15:50:31Z</updated>

		<summary type="html">&lt;p&gt;152.43.1.4: Add section on flow control &amp;amp; equality operator&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Boolean Expressions==&lt;br /&gt;
Python has a Boolean type. The two values for this type are True and False. Note the capitalization: the first letter must be capitalized. Most text editors, including IDLE, will highlight True and False when properly capitalized. &lt;br /&gt;
&lt;br /&gt;
===The bool() Function===&lt;br /&gt;
If you need to convert something into a boolean value, use the bool() function. For example:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(1)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(0)&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(500)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(-1)&lt;br /&gt;
 True&lt;br /&gt;
In Python, the integer 0 evaluates to False. All other integers will evaluate to True. As a general rule, try to avoid using Floating Point numbers in boolean expressions: use the int() operator to turn them into integers first.&lt;br /&gt;
&lt;br /&gt;
Strings behave similarly: an empty string evalueates to False, all other strings evaluate to True.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;Hello World!&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;&amp;quot;)&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;True&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;False&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;0&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
Note that what is &#039;&#039;in&#039;&#039; the string does not matter: It can be &amp;quot;0&amp;quot;, &amp;quot;False&amp;quot; or &amp;quot;ReallyReallyFalse&amp;quot;: Everything that is not simply an empty string will evaluate to true. &lt;br /&gt;
&lt;br /&gt;
==Comparison Operators==&lt;br /&gt;
Python has a number of built-in comparison operators. They are very versatile and can often be used across data types. &lt;br /&gt;
=== Equality===&lt;br /&gt;
The Python operator for Equality is ==. Let&#039;s try it out:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; 1==1&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; &amp;quot;1&amp;quot;==&amp;quot;1&amp;quot;&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; 2+4 == 24&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; &amp;quot;2&amp;quot;+&amp;quot;4&amp;quot; == &amp;quot;24&amp;quot;&lt;br /&gt;
 True&lt;br /&gt;
&lt;br /&gt;
==Flow Control==&lt;br /&gt;
Now that you know all these great ways to work with booleans, let&#039;s use them! Python uses a simple keyword called &amp;quot;if&amp;quot; to determine &#039;&#039;if&#039;&#039; it should execute a section of code. You can tell which lines are in this section by the level of indentation. The general format of if goes like this:&lt;br /&gt;
 if [Boolean Expression]:&lt;br /&gt;
     some code&lt;br /&gt;
 rest of code&lt;br /&gt;
This allows for very simple logic. What if you want to have two options, similar to &amp;quot;case&amp;quot; in other languages? Instead of Case, python uses &amp;quot;elif&amp;quot;. &lt;br /&gt;
 if [Boolean Expression]:&lt;br /&gt;
     code&lt;br /&gt;
 elif [Boolean Expression]:&lt;br /&gt;
     More code&lt;br /&gt;
 else:&lt;br /&gt;
     Even more code&lt;br /&gt;
 rest of program&lt;br /&gt;
One thing that&#039;s important to realize is that if the boolean expression for the first &amp;quot;if&amp;quot; is True, nothing in the elif section will execute, nor will anything in the else section. If there are multiple things that could evaluate to True, use multiple if statements. &lt;br /&gt;
&lt;br /&gt;
That code sample also introduced the &amp;quot;else&amp;quot; statment. Else gets executed if the &amp;quot;if&amp;quot; statement&#039;s boolean expression, and the boolean expressions for all elifs (if there are any), evaluate to False.&lt;br /&gt;
&lt;br /&gt;
So, how about some actual code? Here&#039;s a simple program; try entering this into IDLE and running it. &lt;br /&gt;
 name = raw_input(&amp;quot;What is your name?&amp;quot;)&lt;br /&gt;
 if name == &amp;quot;&amp;quot;:&lt;br /&gt;
     print &amp;quot;Hey! You didn&#039;t enter a name!&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 elif name == &amp;quot;spam&amp;quot; or name == &amp;quot;eggs&amp;quot;:&lt;br /&gt;
     print &amp;quot;A moose once bit my sister!&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 else:&lt;br /&gt;
     print &amp;quot;Nice to meet you, %s.&amp;quot; % name&lt;/div&gt;</summary>
		<author><name>152.43.1.4</name></author>
	</entry>
	<entry>
		<id>https://ideawaza.com/index.php?title=Truth_and_flow_control_in_Python&amp;diff=38198</id>
		<title>Truth and flow control in Python</title>
		<link rel="alternate" type="text/html" href="https://ideawaza.com/index.php?title=Truth_and_flow_control_in_Python&amp;diff=38198"/>
		<updated>2007-02-24T15:37:44Z</updated>

		<summary type="html">&lt;p&gt;152.43.1.4: First couple sections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Boolean Expressions==&lt;br /&gt;
Python has a Boolean type. The two values for this type are True and False. Note the capitalization: the first letter must be capitalized. Most text editors, including IDLE, will highlight True and False when properly capitalized. &lt;br /&gt;
&lt;br /&gt;
===The bool() Function===&lt;br /&gt;
If you need to convert something into a boolean value, use the bool() function. For example:&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(1)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(0)&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(500)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(-1)&lt;br /&gt;
 True&lt;br /&gt;
In Python, the integer 0 evaluates to False. All other integers will evaluate to True. As a general rule, try to avoid using Floating Point numbers in boolean expressions: use the int() operator to turn them into integers first.&lt;br /&gt;
&lt;br /&gt;
Strings behave similarly: an empty string evalueates to False, all other strings evaluate to True.&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;Hello World!&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;&amp;quot;)&lt;br /&gt;
 False&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;True&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;False&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
 &amp;gt;&amp;gt;&amp;gt; bool(&amp;quot;0&amp;quot;)&lt;br /&gt;
 True&lt;br /&gt;
Note that what is &#039;&#039;in&#039;&#039; the string does not matter: It can be &amp;quot;0&amp;quot;, &amp;quot;False&amp;quot; or &amp;quot;ReallyReallyFalse&amp;quot;: Everything that is not simply an empty string will evaluate to true. &lt;br /&gt;
&lt;br /&gt;
==Comparison Operators==&lt;/div&gt;</summary>
		<author><name>152.43.1.4</name></author>
	</entry>
</feed>