Skip to content

Commit 276bb1b

Browse files
committed
Update 2.md
1 parent fb538be commit 276bb1b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

2.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ TypeError: unsupported operand type(s) for /: 'str' and 'str'
9292
Variables are easy to understand. They simply contain data. _[*]_
9393

9494
```py
95-
>>> a = 1 # creates a variable called a and assigns 1 to it
96-
>>> a # gets the value of a
95+
>>> a = 1 # create a variable called a and assigns 1 to it
96+
>>> a # get the value of a
9797
1
9898
>>>
9999
```
@@ -214,7 +214,7 @@ True
214214
False
215215
>>> c = None
216216
>>> c # nothing happens, the interactive prompt doesn't show None
217-
>>> print(c) # print() can be used to print it instead
217+
>>> print(c) # print() can be used to display it instead
218218
None
219219
>>>
220220
```
@@ -235,7 +235,7 @@ There are other comparing operators than `==` too:
235235
| `a and b` | a is True and b is True _[*]_ | `1 == 1 and 2 == 2` |
236236
| `a or b` | a is True, b is True or they're both True _[*]_ | `False or 1 == 1`, `1 == 1 or 2 == 2` |
237237

238-
_[*] These are not always correct, but this tutorial is about Python's basics, not about cool tricks we can do with it. See [here](https://docs.python.org/3/library/stdtypes.html#truth-value-testing) for more info._
238+
_[*] These are not always correct, but this tutorial is about Python's basics, not about cool tricks we can do with it. See [this](https://docs.python.org/3/library/stdtypes.html#truth-value-testing) for more info._
239239

240240
There is more than one way to do some things. For example, to check if a is not equal to 1 you could do `a != 1` or `not a == 1`. To check if a is not in b you could do `a not in b` or `not a in b`. However, `!=` and `not in` should be used when possible because they're more convinient once you get used to them.
241241

0 commit comments

Comments
 (0)