Skip to main content
PRACTICE / PROGRAMMING / PYTHON 05

Working with Data Clinic.

Nine real Python challenges: clean status strings, update a list, handle optional attributes, filter devices, deduplicate sites and produce a health report.

9 coding challengesPython in your browserVariable tracingNo account

How this clinic works: Read the scenario, modify the starter code, then run it to inspect the output and variable trace. Use Check to verify your results. No live systems are involved.

Review Working with Data →
JOELEARNS / PYTHON WORKBENCH

Write it. Run it. Understand it.

Clean, combine and report on real Python collections. Write a transformation and verify it.

Python 3.14 · in-browser
CHALLENGE 01 / 9 · BEGINNER

Normalize a device status

The fictitious inventory returned a whitespace-padded mixed-case status. Normalize it to lowercase 'offline', store the result in clean_status and print exactly 'offline'. Do not replace the raw value itself.

EXPECTED OUTPUToffline
script.py editableCtrl / Cmd + Enter to run
Your code is stored only in session storage when enabled. Never paste secrets. Clearing this option clears saved drafts, not the editor.
Code executes only when you choose Run or Check. No account needed.
HINTS · OPTIONAL

Try solving it before asking for help. Hints never show a completed program.

PYTHON OUTPUTReady

Your printed output and errors will appear here.

VARIABLE TRACER

Run the code, then step through the executed lines to watch variable values change.

About this environment: The Python runtime is loaded on demand from a version-pinned CDN and runs inside a sandboxed, opaque-origin browser frame. Runs have a time limit. OS/network automation is outside this introductory workbench. If your code calls input(), a response panel appears to supply text to those calls. Don't paste secrets or untrusted scripts.