Python Vocabulary Flashcards
\
slash character
seek()
allows you to jump to a certain area within a file
\f
ASCII Formfeed (FF)
'
single quote
argv
a variable that accepts commands from the command line input
os.path
a library built into python
\N
character named in the unicode database (unicode only)
exists
a command within os.path that determines whether a file exists or not
\a
ASCII Bell (BEL)
raw_input()
accepts input from the user
displays text on the screen
-
minus
\v
ASCII vertical tab (VT)
>=
greater than or equal
+=
add what’s to the right, then set equal to what’s on the left
"
double quote
def
declares a function
\uxxxx
Character with 16 bit hex value xxxx (unicode only)
\Uxxxxxxxx
Character with 32 bit hex value xxxxxxxx (unicode only)
%
percent - allows you to specify which values your formatters refer to
trucate()
clears out all text from a file
>
greater than
open()
opens a particular file, making the data it contains accessible to work with (must be assigned to a variable)
read()
can take an opened file and interpret the text it contains, which can then be printed
\xhh
Character with hex value hh
%r
formatter used for debugging
<
less than
\r ASCII
Carriage Return (CR)
%s
formatter indicating a string
close()
closes and saves the file
\t
tab character
+
plus
\ooo
Character with octal value ooo
from [library] import [argument]
imports certain commands from python libraries
sys
a library built into python
write()
writes text to an open file
#
turns line into a comment
‘w’/’r’/’a’
read, write, and append attributes to be applied when opening a file
=
sets a variable
” or ‘
surrounds a string or line of text
python -m pydoc [command]
displays the help page for a particular command
<=
less than or equal
/
slash
*
asterisk
\b
ASCII Backspace (BS)
%d
formatter that indicates a decimal number
*args
allows you to set a series of args to a function
”””
indicates a multi-line quote
\n
indicates a new line