method for format age in python code example
Example: method for format age in python
def format_age(s):
chars = list(s) # list of characters
digit_chars = [c for c in chars if c.isdigit()]
return int("".join(digit_chars))
def format_age(s):
chars = list(s) # list of characters
digit_chars = [c for c in chars if c.isdigit()]
return int("".join(digit_chars))