A blog post on choosing more specific types rather than general ones like list and dict.

  • @[email protected]
    link
    fedilink
    81 year ago

    If you don’t need to reuse the collection or access its items out of order, you can also use Iterable which accepts even more inputs like generators.