Results for “strip”

Showing 61–70 of 72

  1. Challenge

    Parse the whole feed

    …kPa ENG-2: 415.0 C feed.splitlines() gives a list with one string per line. Inside the loop, line.split(",") gives the four fields, as in "Parse a telemetry line". Named fields and the time Unpack the…

    Write the code Easy 2 stages for loop splitlines split unpacking
  2. Challenge

    Crew roster

    …member: Kowalska Crew size: 4 Indexes start at 0, as in strings. crew[-1] is the last item whatever the list's length, and len(crew) counts the items. The whole roster Add the second in command, who…

    Write the code Easy 2 stages lists indexing negative index len
  3. Challenge

    Last five readings

    …at the end. A negative start counts from the end, as with strings. The window moves A new reading has arrived. Add new_reading = 772 under the list, append it to the readings, then show the new window…

    Write the code Easy 2 stages lists slicing negative slice append
  4. Challenge

    Duration formatter

    …digits, so 3725 seconds would show as 01:02:05 . In an f-string, {minutes:02d} pads a whole number with zeros to two digits. Days too Long missions count days as well. Mission control displays often…

    Write the code Easy 3 stages floor division modulo // %
  5. Article Python Fundamentals

    Python If/Else for Beginners

    …print("No payloads — skip deployment.") Empty lists, empty strings, zero, and None all evaluate to False . Pretty much everything else is True . Nesting: decisions within decisions You can nest if…

  6. Article Python Fundamentals

    Online Python Editor

    …We've all been there. That moment when inspiration strikes at the worst possible time - during your commute, waiting in line, or even in an elevator. Your brain won't let go until you test that code…