Skip to content

Commit

Permalink
Merge pull request #274 from annekoopman/inequality_operator
Browse files Browse the repository at this point in the history
Added a description of the inequality operator.
  • Loading branch information
bmispelon committed Mar 8, 2015
2 parents 58b8d53 + ac5913c commit 86ef903
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 86ef903

Please sign in to comment.