Results for “strip”

Showing 11–20 of 72

  1. Challenge

    Command parser

    …unknown command: dance REJECTED "": empty command text.strip().lower().split() gives the words. Converting the length can raise its own ValueError : catch it and raise yours, with a clearer message…

    Write the code Medium 2 stages project parsing strings split
  2. Challenge

    Validate a command

    …START : Starting the sequence Normalise the answer with strip().lower() straight away, then compare it in an if / elif chain, with else at the end. Helpful errors Make the errors helpful. For an empty…

    Write the code Easy 2 stages if elif else input
  3. Challenge

    Log formatter function

    Move the mission log's f-string into format_log(t, level, msg), a function that returns the line instead of printing it, then fix the alignment of every log line with one change inside the function.

    Fix the code Easy 2 stages functions def return refactoring
  4. Challenge

    Debris grid

    Scan a radar grid stored as a list of strings with a loop inside a loop, print the row and column of every # with enumerate(), then turn the loops around to find the columns that are clear all the way…

    Write the code Medium 2 stages nested loops enumerate range strings