Skip to content

Commit

Permalink
case-sEnsItivItY
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Sep 24, 2016
1 parent b5b9ade commit 7a55fc8
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@

## Variables

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

```py
>>> a = 1 # create a variable called a and assign 1 to it
>>> a # get the value of a and let Python echo it
>>> a = 1 # create a variable called a that points to 1
>>> a # get the value that a points to
1
>>>
```

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

```py
>>> a = 2
>>> a = 2 # make it point to 2 instead
>>> a
2
>>>
Expand Down Expand Up @@ -47,6 +45,21 @@ use underscores.
>>>
```

Variable names are case-sensitive, like many other things in Python.

```py
>>> thing = 1
>>> THING = 2
>>> thIng = 3
>>> thing
1
>>> THING
2
>>> thIng
3
>>>
```

Python also has some words that cannot be used as variable names
because they have a special meaning. They are called **keywords**, and
you can run `help('keywords')` to see the full list if you want to.
Expand Down

0 comments on commit 7a55fc8

Please sign in to comment.