Results for “key”

Showing 1–10 of 62

  1. Challenge

    Missing field

    Reading launch["pad"] stops with a KeyError when the API hasn't assigned a pad yet. Predict it, check the keys with in, fix it with get() and a default, then print a list of launches with defaults for…

    Fix the code Easy 3 stages dictionaries KeyError get default values
  2. Challenge

    Sorted copy

    …then sort names like de Vries and van Dijk correctly with key=str.lower.

    Write the code Easy 2 stages lists sorted sort key
  3. Challenge

    Confirm by name

    …confirm=True is passed by name: a bare * makes confirm keyword-only and required, then an is True check refuses values that are merely truthy, such as "yes".

    Write the code Medium 2 stages functions keyword-only arguments * safety