Standard Library

Strings, paths, collections, caching, logging and dates: the batteries Python already includes.

  1. 01

    Build Strings Efficiently

    • easy
    • Pro
  2. 02

    Files and Paths with Pathlib

    • easy
    • Pro
  3. 03

    Count Things with Counter

    • easy
    • Pro
  4. 04

    Group Items with Defaultdict

    • easy
    • Pro
  5. 05

    A Queue with Deque

    • medium
    • Pro
  6. 06

    Top K with Heapq

    • medium
    • Pro
  7. 07

    Search a Sorted List with Bisect

    • medium
    • Pro
  8. 08

    Cache Results with LRU Cache

    • medium
    • Pro
  9. 09

    Replace Magic Strings with Enum

    • medium
    • Pro
  10. 10

    Logging Instead of Print

    • medium
    • Pro
  11. 11

    Run Commands with Subprocess

    • medium
    • Pro
  12. 12

    Why Set Lookups Are Fast

    • hard
    • Pro
  13. 13

    Time Zones and Datetime

    • hard
    • Pro