I'm new to Python but here is the question
Given a string, write a program to return the sum and average of the numbers that appear in the string, ignoring all other characters.
Input
The input will be a single line containing a string.
Output
The output should contain the sum and average of the numbers that appear in the string. Note: Round the average value to two decimal places.
Explanation
For example, if the given string is "I am 25 years and 10 months old", the numbers are 25, 10. Your code should print the sum of the numbers(35) and the average of the numbers(17.5) in the new line.
Test Cases
Input
I am 25 years and 10 months old
Output
35 17.5
The above test case is pretty straightforward and simple,my problem comes when you trying to solve something like this.
Input
A girl64 35spaces numb6rs
Output
205 66.66
So basically what I am asking is, how do you extract the digits thats existing between a string of characters. To make it so that (164) does not become (1,6,4)