Study

HS Python coding vocab

  •   0%
  •  0     0     0

  • code that might raise an exception
    try
    except
    next
    do
  • Connects 2 expressions and evaluates for true or false
    ore
    OR
    or
    Or
  • Context manager, defines code to be executed within the context manager's scope.
    WITH
    WITHIN
    with
    within
  • defines a function without a name and with only 1 statement
    Delta
    delta
    Lambda
    lambda
  • defines an asynchronous function
    async
    asynchronous
    sync
    asynch
  • Exits a loop early
    break
    Stop
    BREAK
    stop
  • used to modify a variable that isn't defined in a function but from a parent scope
    local
    nonlocal
    parent
    global
  • Used with "import" and "from" to change the name of what is being imported
    change
    switch
    alias
    as
  • results in a no-op if the expression is truthy or an "AssertionError" if the expression is falsy
    error
    assert
    true
    express
  • Gives the opposite Boolean value of a variable
    not
    Other
    other
    Not
  • Used to include a module into your Python program
    import
    IMPORT
    bringin
    Bringin
  • valid only when used with "def"; exits the function and returns the results
    return
    BACK
    Return
    Back
  • Boolean statement: opposite of false.
    true
    True
    tru
    yes
  • raises an exception
    raises
    top
    lifts
    raise
  • Used to determine if both left and righ operands are truthy or falsy
    AND
    and
    BOTH
    both
  • Boolan statement, opposite of true
    fulse
    not
    false
    False
  • Used with "try" to define what happens when specific exceptions are raised
    except
    go
    continue
    expand
  • Starts a conditional statement if the statement is true.
    Then
    if
    IF
    then
  • containmennt check, is a element included in the data
    in
    with
    out
    included
  • Stops the current loop and moves to next step
    NEXT
    continue
    CONTINUE
    Next
  • defines the point in the function where control is given back to the event loop
    event
    await
    back
    stop
  • indicates a block intentionally left blank
    skip
    Skip
    pass
    Pass
  • Used with import to bring in something from a specific module.
    from
    and
    with
    next
  • Loop word, if conditions that follow are truthy, using this keyword will keep its statement running over and avoer
    While
    while
    When
    when
  • Denotes blocks of code that should be run when "if" and "elif" statements are falsy
    Else
    Elsethen
    ELSETHEN
    else
  • returns a "generator" from a function
    Yield
    yield
    YEILD
    yeild
  • specifies code that should be run no matter what happens in the "try", "except" or "else" blocks
    finally
    final
    last
    lastly
  • Most common loop, often used with "in"
    for
    FOR
    Loop
    loop
  • An empty string of code
    none
    blank
    blanck
    None
  • used to define a function or method of class
    def
    Define
    define
    DEF
  • used to modify a variable that isn't defined in a function but in a global scope
    define
    global
    modify
    scope
  • Defines a class in python, powerful in object-oriented programming
    Group
    group
    Class
    class
  • works like "if" statement but can only be used after an "if" or another of the same statement
    Elif
    elif
    else if
    ElseIf
  • remove indexes from a list or dictionary, or unsets a variable
    delete
    remove
    del
    rid
  • Object identity check: determines if 2 objects are exactly the same.
    si
    IS
    Is
    is