Question: PYTHON 3: must use try/except for exception handling Write a function extractInt() that takes a string as a parameter and returns an integer constructed out
PYTHON 3:
must use try/except for exception handling
Write a function extractInt() that takes a string as a parameter and returns an integer constructed out of the digits that appear in the string. The digits in the integer should appear in the same order as the digits in the string. If the string does not contain any digits or an empty string is provided as a parameter, the value 0 should be return.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
