Step: String methods: split, strip, join
String methods: split, strip, join
.split(",") breaks a string into a list on a separator; .strip() trims surrounding whitespace; ", ".join(list) glues a list back into one string.
Why it matters: this split → clean → join pattern is the bread-and-butter of parsing messy text input.
Example: "a, b".split(",") is ["a", " b"]; " b".strip() is "b".
Your turn: split line on commas, strip each piece, then rejoin with ", ".
Pitfall: ", ".join(...) needs a list of strings — joining a list containing numbers raises TypeError.
Setup:
Your code:Expected output:
Step 13 of 18