python程序设计

编写程序从用户处获得一个不带数字的输入,如果用户输入中含数字,则需要用户再次输入,直至满足条件。打印输出这个输入

import re
text = input("请输入,不带数字的内容\n")
while 1:

    if re.findall("\d",text):
        text = input("输入有误,请重新输入\n")
    else:
        print(text)
        break

img