标签: python regex python-3.x loops user-input
代码的外观如下:
import re t=int(input()) for i in range(t): s=str(input()) print(bool(re.match(r"\d",s)))