File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
course_contents/1_intro/notes Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ Each comparison operator returns True or False
7
7
8
8
- Can be used to check the truth value of an operand:
9
9
10
- ` 4 == True # True `
10
+ ` 4 is True # True `
11
11
12
- ` 4 == False # False `
12
+ ` 4 is False # False `
13
13
14
- ` 0 == False # True `
14
+ ` 0 is False # True `
15
15
16
16
- Can be used to compare two strings or any other data type:
17
17
@@ -24,7 +24,7 @@ Each comparison operator returns True or False
24
24
` (100, 50) == (500, 219) # False `
25
25
26
26
### Not equal ` != `
27
- - The opposite of equal
27
+ - The opposite of ` == `
28
28
29
29
` 4 != 4 # False `
30
30
@@ -33,10 +33,6 @@ Each comparison operator returns True or False
33
33
### Greater than ` > `
34
34
` 10 > 10 # False `
35
35
36
- - Two string can be compared as such, based on their length:
37
-
38
- ` "Random longer string" > "Shorter string" # False `
39
-
40
36
### Less than ` < `
41
37
- Opposite of higher than
42
38
` 10 < 10 # False `
You can’t perform that action at this time.
0 commit comments