String methods
Strings have many methods, and none of them change the string. Each returns a new value, so keep the result.
s = " Hello, World "
t = s.strip()
print(t.lower()) # hello, world
print(t.replace("World", "Ada"))
print(t.startswith("Hell")) # True
print(t.find("o"), t.count("o")) # 4 2
print("42".isdigit(), "4a".isdigit())
print("x" in t) # False
print("k=v=w".partition("="))findreturns the position of the first match, or -1.indexdoes the same but raisesValueErrorwhen nothing matches.countcounts matches that do not overlap.isdigit,isalphaandisspaceare true only when every character fits.split(",")splits at every comma and keeps empty pieces.partition("=")splits once, at the first match, and returns three parts: before, the separator, after. If there is no match, the last two are empty.
A line like s.upper() on its own does nothing useful. Write s = s.upper().
Your task
Write parse_setting(line) that turns text like " Volume = 7 " into ("volume", "7"): split at the first =, strip both parts, lower-case the key, and return None if there is no =. Write digits_only(text) returning just the digit characters of text.
The explanation opens here once every check passes.