Question: 3. Write a function that extract a number from a string. The string can contain any character. The number you return is the concatenation
3. Write a function that extract a number from a string. The string can contain any character. The number you return is the concatenation of all the digits you find in the string. For example, the extracted number from the string "sk8dfjn*HG23Yh$%7-5~5" is 823755. Test your function with the following: "1ksdj4sdf>R?387BDYGrrf%44@2"
Step by Step Solution
There are 3 Steps involved in it
re mainpy 12345678 def extractnumberfromstringinputstring extractednumber ... View full answer
Get step-by-step solutions from verified subject matter experts
