import re # 找出所有非数字 pat = re.compile(r"\D") tel = input() # 用空替换所有非数字(即去除) tel_allnum = pat.sub(r"", tel) print(tel_allnum)