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

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

1 Expert Approved Answer
Step: 1 Unlock

re mainpy 12345678 def extractnumberfromstringinputstring extractednumber ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!