You are given a string that consists only of digits, letters, and whitespace characters. Your task is to scan the string, identify every maximal contiguous block of digit characters, convert each block into an integer, and return all these integers in the order they appear.
def extract_numbers(s: str) -> list[int]:
"abc123def456"
[123, 456]
The digits "123" form the first number, and "456" the second. All non-digit characters are skipped.
"a1b2c3"
[1, 2, 3]
Each digit is isolated by letters, so they become separate integers.
"12 34 56"
[12, 34, 56]
Whitespace separates the digit groups but is ignored; each group is parsed as a number.