1
00:00:00,000 --> 00:00:03,990
So we are going to talk about the logical values of true and false here, and for

2
00:00:04,000 --> 00:00:07,990
this purpose I have started up the Python Shell, which on the graphical

3
00:00:08,000 --> 00:00:12,990
interfaces will be called Idle, or if you're in a command-line interface, it's

4
00:00:13,000 --> 00:00:15,990
simply the Python interpreter. It gets you exactly the same interface.

5
00:00:16,000 --> 00:00:19,990
So, I'm going to start by creating couple of variables. We'll call them a and b,

6
00:00:20,000 --> 00:00:22,990
and we'll assign them values of zero and 1 a, b - 0, 1.

7
00:00:23,000 --> 00:00:30,990
And I'm going to say a==b, and so the double equal sign is the equality operator.

8
00:00:31,000 --> 00:00:34,990
It tests for equality between two values, and it returns either True or False.

9
00:00:35,000 --> 00:00:41,990
In this case it returns False, and false is actually a keyword in Python, which is a

10
00:00:42,000 --> 00:00:44,990
Boolean value for False.

11
00:00:45,000 --> 00:00:51,990
So, if I say a < b, I will get the Boolean value True, or a > b, I'll get the

12
00:00:52,000 --> 00:00:53,990
Boolean value False.

13
00:00:54,000 --> 00:00:59,990
In fact, you can assign True and False to variables. I can say a = True, and if

14
00:01:00,000 --> 00:01:06,990
I type a by itself, I get True. If I type, type of a, you'll see it is class 'bool'.

15
00:01:07,000 --> 00:01:12,990
So, True and False are objects of class 'bool,' and they are mutable objects of course.

16
00:01:13,000 --> 00:01:20,990
So, if I type id of a, I get an id, and if I assign b = True and type id of b, I

17
00:01:21,000 --> 00:01:22,990
get exactly the same id.

18
00:01:23,000 --> 00:01:28,990
In fact, if I simply type id of True id, I will get that id.

19
00:01:29,000 --> 00:01:33,990
So, true and false are Boolean objects, and they are very simple, and they're

20
00:01:34,000 --> 00:01:44,000
simply used for representing the Boolean values of true and false.

