Study

HS Python coding vocab

  •   0%
  •  0     0     0

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