Skip to content

Commit 7a55fc8

Browse files
committed
case-sEnsItivItY
1 parent b5b9ade commit 7a55fc8

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

variables.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22

33
## Variables
44

5-
Variables are easy to understand. They simply **contain data**. Actually
6-
they [point to data](https://www.youtube.com/watch?v=_AEJHKGk9ns), but
7-
think about them as data containers for now.
5+
Variables are easy to understand. They simply **point to data**.
86

97
```py
10-
>>> a = 1 # create a variable called a and assign 1 to it
11-
>>> a # get the value of a and let Python echo it
8+
>>> a = 1 # create a variable called a that points to 1
9+
>>> a # get the value that a points to
1210
1
1311
>>>
1412
```
1513

1614
We can also change the value of a variable after setting it.
1715

1816
```py
19-
>>> a = 2
17+
>>> a = 2 # make it point to 2 instead
2018
>>> a
2119
2
2220
>>>
@@ -47,6 +45,21 @@ use underscores.
4745
>>>
4846
```
4947

48+
Variable names are case-sensitive, like many other things in Python.
49+
50+
```py
51+
>>> thing = 1
52+
>>> THING = 2
53+
>>> thIng = 3
54+
>>> thing
55+
1
56+
>>> THING
57+
2
58+
>>> thIng
59+
3
60+
>>>
61+
```
62+
5063
Python also has some words that cannot be used as variable names
5164
because they have a special meaning. They are called **keywords**, and
5265
you can run `help('keywords')` to see the full list if you want to.

0 commit comments

Comments
 (0)