Study

HS Python coding vocab

  •   0%
  •  0     0     0

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