aa = "0112314860b2047431411" bb = ''.join(filter(lambda x: x.isdigit(), aa)) print(bb) print(aa.isdigit())