Solved

Stage 2 — the code at the end of the line

FreyaLOP

My solution works when there's text after the code, but what if the code is last?

10

Comments 4

Join the discussion

Already have an account? Log in

  1. OliviaPy Solutionreplies: 1

    Good thinking. find(" ", start) returns -1 if there's no space after the code. Handle that case by using the end of the line instead.

    12
    1. HenryWrites

      For the stage itself the code is in the middle, but edge cases like this are what reviewers look for.

      5
      1. LiamByte

        Masking secrets in logs is a real thing. Credit card receipts do the same with the last 4 digits.

        1