Skip to content

Commit

Permalink
Added a description of the inequality operator.
Browse files Browse the repository at this point in the history
  • Loading branch information
annekoopman committed Mar 8, 2015
1 parent 58b8d53 commit ac5913c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion en/python_introduction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,12 @@ A big part of programming includes comparing things. What's the easiest thing to
True
>>> 1 == 1
True
>>> 5 != 2
True

We gave Python some numbers to compare. As you can see, Python can compare not only numbers, but it can also compare method results. Nice, huh?

Do you wonder why we put two equal signs `==` next to each other to compare if numbers are equal? We use a single `=` for assigning values to variables. You always, __always__ need to put two `==` if you want to check if things are equal to each other.
Do you wonder why we put two equal signs `==` next to each other to compare if numbers are equal? We use a single `=` for assigning values to variables. You always, __always__ need to put two `==` if you want to check if things are equal to each other. We can also state that things are unequal to each other. For that, we use the symbol `!=`, as shown in the example above.

Give Python two more tasks:

Expand Down

0 comments on commit ac5913c

Please sign in to comment.