A class keeps a code with its spaces removed, and a method picks out its digits.
class Code:
def __init__(self, raw):
self.raw = raw.strip()
def digits(self):
return "".join(ch for ch in self.raw if ch.isdigit())
c = Code(" A-12-b7 ")
print(c.digits(), int(c.digits()) + 1, c.raw.split("-"))
What does the program print?