Strings and f-strings
A string is an immutable sequence of characters. Methods return new strings and leave the original alone.
s.strip()removes surrounding whitespace.s.split()breaks on any run of whitespace and returns a list."-".join(parts)glues a list back together.s.upper(),s.lower()ands[0]do what they look like.
f-strings
Put f before the quote and expressions inside braces. After a colon you can add a format spec.
name = "Ada"
cost = 3.5
print(f"{name}: {cost:.2f}")
print(f"[{name:<6}]") # [Ada ]
print(f"[{cost:>6.2f}]") # [ 3.50]
print(f"{cost = }") # cost = 3.5< pads on the right, > pads on the left, and the number is the minimum width. Text longer than the width is not cut.
Python 3.14 also adds t-strings, a template form aimed at libraries. For everyday text, f-strings are the tool.
Your task
Write receipt_line(name, price, qty) returning the name padded to width 10, a space, x and the quantity, a space, then price * qty right-aligned in width 7 with 2 decimals. Write initials(full_name) returning the upper-case first letter of each word.
The explanation opens here once every check passes.