Study

HS Python coding vocab

  •   0%
  •  0     0     0

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