Solved

Should I use datetime instead of slicing?

SophieDevOP

Slicing ISO timestamps feels fragile.

10

Comments 4

Join the discussion

Already have an account? Log in

  1. FreyaL Solutionreplies: 2

    For real code, yes — datetime.fromisoformat() parses it properly (and since 3.11 it handles the trailing "Z"). This challenge is about practising slicing, and ISO 8601 is fixed-width, so slicing works reliably here.

    7
    1. JackStack

      The "Mission elapsed time" challenge uses datetime later on.

      6