Symbol | Access Mode | Description |
---|---|---|
r | Read text | Opens a file for reading only |
w | Write text | Opens a file for writing only |
a | Append text | Opens a file for writing to the end of the file |
r+ | Read and Write text | Opens a file for both reading and writing |
rb | Read binary | Opens a file for reading binary data |
w | Write binary | Opens a file for writing binary data |
mov eax,1
True
or False
.
True
or False
.
try
/except
statement to handle an
exception, you are said to catch an exception.
for
loop and the clauses of an if
statement are code blocks.
return
statement
in the same code block.
A - B
cd
to enter a directory.except
block that is run
when an exception caught.
File Descriptor | Stream |
---|---|
0 | Standard Input |
1 | Standard Output |
2 | Standard Error |
5.75or using scientific notation:
7.25e12
A ∩ B
for
loop.
average = games/games
x x ∈ A
print
to its printed arguments, to a space you would write
end=" "
if
Statementif
statement, which contains another if
statement in one of
its code blocks.
None
is a Python literal
is null
.
<(COMMAND)
r"foo"
Operator | Boolean Comparison |
---|---|
== | Equal |
!= | Not equal |
> | Greater than |
< | Less than |
>= | Greater than or equal to |
<= | Less than or equal to |
return
keyword to send a value
back to the Python statement that called it. It has the format
return EXPRESSION
A - B
x ∈ A
A Δ B
and
and or
that prevents the second
operand from being evaluated if the overall result is obvious from the
value of the first operand.
A ⊂ B
A ⊃ B
tar
utility that contains
many files and directories.
a, b, c = 5, 10, 15
A ∪ B
for
loop.