8000 small changes · VixyMan/complete-python-course@f14e04e · GitHub
[go: up one dir, main page]

10000 Skip to content

Commit f14e04e

Browse files
committed
small changes
1 parent 1e38dc0 commit f14e04e

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

course_contents/1_intro/notes/03. Comparison Operators.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ Each comparison operator returns True or False
77

88
- Can be used to check the truth value of an operand:
99

10-
`4 == True # True`
10+
`4 is True # True`
1111

12-
`4 == False # False`
12+
`4 is False # False`
1313

14-
`0 == False # True`
14+
`0 is False # True`
1515

1616
- Can be used to compare two strings or any other data type:
1717

@@ -24,7 +24,7 @@ Each comparison operator returns True or False
2424
`(100, 50) == (500, 219) # False`
2525

2626
### Not equal `!=`
27-
- The opposite of equal
27+
- The opposite of `==`
2828

2929
`4 != 4 # False`
3030

@@ -33,10 +33,6 @@ Each comparison operator returns True or False
3333
### Greater than `>`
3434
`10 > 10 # False`
3535

36-
- Two string can be compared as such, based on their length:
37-
38-
`"Random longer string" > "Shorter string" # False`
39-
4036
### Less than `<`
4137
- Opposite of higher than
4238
`10 < 10 # False`

0 commit comments

Comments
 (0)
0