2020-11-09
def isNum(q): if type(eval(q)) == type(1) or type(eval(q)) == type(1.1) or type(eval(q)) == type(12.3+4j): return True else: return Falsedef main(): a = input("请输入要输入的字符串:") print(isNum(a))try: main()except Name