Search for question
Question

Question #1 Using Python's string capabilities, loops, and built-in functions, write the code for a Python user-defined function that removes all characters from a string except digit characters. The function returns

the resultant string. The function prototype MUST be: def digits_only (s) See table below for examples of the original and resultant strings. Original (s): "how many seas are there? 7" "In 1990 Guido Van Rossum invented Python!" "no digits in this string" "who is the #1 team in the nhl in 2024?" New: "7" "1990" "1" "12024"

Fig: 1