ADV PROG DAY 5 Flashcards
Generates a list of every number between 0 and up to, but not including, the value specified by Stop. Start is defaulted to a value of 0 and step is defaulted to a value of 1.
range( Stop )
Generates a list of every number between the value specified by Start Generates a list of every number between the value specified by Start and up to, but not including, the value specified by Stop. Step is defaulted to a value of 1.and up to, but not including, the value specified by Stop. Step is defaulted to a value of 1.
range( Start, Stop )
Generates a list of every number between the value specified by Start and up to, but not including, the value specified by Stop, incrementing by the value specified by Step. (Step can be a negative value)
range( Start, Stop, Step )
Informs Python that the following block of code is a function definition.
def
A unique name by which a function is known. Following the same rules as variable naming (i.e., can contain letters, numbers, and underscores only, but may not begin with a number).
function_name
Functions can be written to allow from zero to 255 arguments. If a parameter contains an equal sign, the right-side is the default value in case no argument was passed. Each parameter must have a unique name.
parameters
The code to execute when the function is called.
function_body
Optional. Returns a value from the function to where it was called. A function without a return instruction automatically returns after all logically sequential instructions have been executed.
return
s a file that contains one or more functions and/or classes that may be reused to save time writing and debugging new source code.
module
Make the . (match any character), include
re.S
Allow case insensitive searches on string
re.I
Allows the expression to search for strings which span multiple lines
re.M
looks through the entire string for the pattern specified.
search()
which isolates just that segment of the string.
group()
returns a list of matches to all non-overlapping values in a specified string. This is useful when there may be more than one instance of data to extract.
findall()