Solved Stage 2 — the code at the end of the line FRFreyaLOP 1 Oct, 16:51 My solution works when there's text after the code, but what if the code is last?
OLOliviaPy1 Oct, 22:08 Solutionreplies: 1Good thinking. find(" ", start) returns -1 if there's no space after the code. Handle that case by using the end of the line instead.
HEHenryWrites2 Oct, 13:00For the stage itself the code is in the middle, but edge cases like this are what reviewers look for.
LILiamByte2 Oct, 16:07Masking secrets in logs is a real thing. Credit card receipts do the same with the last 4 digits.
Comments 4
Join the discussion CommentAlready have an account? Log in
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.Added that check. More robust now.
For the stage itself the code is in the middle, but edge cases like this are what reviewers look for.
Masking secrets in logs is a real thing. Credit card receipts do the same with the last 4 digits.