Add relational operators.
This commit is contained in:
parent
4aaf387c89
commit
04a799c56e
|
@ -87,12 +87,31 @@ strings"""
|
||||||
True = int(1)
|
True = int(1)
|
||||||
False = int(0)
|
False = int(0)
|
||||||
|
|
||||||
|
## Relational Operators (ch.4, ex. 3)
|
||||||
|
|
||||||
|
`==` returns `True` if is is equal and returns `False` otherwise.
|
||||||
|
`!=` returns `True` if is is NOT equal and returns `False` otherwise.
|
||||||
|
|
||||||
|
Here are more of he same kind of operator:
|
||||||
|
|
||||||
|
`>` greater than
|
||||||
|
`<` less than
|
||||||
|
`>=` greater than or equal to
|
||||||
|
`<=` less than or equal to
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Datatypes
|
# Datatypes
|
||||||
|
|
||||||
Force treating as a string: str(7)
|
Force treating as a string: str(7)
|
||||||
Force treating as an integer: int("7")
|
Force treating as an integer: int("7")
|
||||||
Froce treating as a float: float(7)
|
Froce treating as a float: float(7)
|
||||||
|
|
||||||
|
## Check Datatypes
|
||||||
|
|
||||||
|
Check datatypes using type(var)
|
||||||
|
|
||||||
# Escaping Characters
|
# Escaping Characters
|
||||||
|
|
||||||
Simply add a `\` to escape a character that would otherwise cause issues.
|
Simply add a `\` to escape a character that would otherwise cause issues.
|
||||||
|
|
Loading…
Reference in New Issue