标签:.com png put 整数 name -- ima 图片 end
name = input("Name:") age = input("Age:") job = input("job:") salary = input("Salary:") if salary.isdigit(): # 判断是不是整数 salary = int(salary) else: exit("must input digit") msg = ‘‘‘ ----------info of is %s-------- Name:%s Age :%s Job :%s Salary:%s --------------END-------------- ‘‘‘ % (name, name, age, job, salary) print(msg)
输出结果:
标签:.com png put 整数 name -- ima 图片 end
原文地址:https://www.cnblogs.com/ss-long/p/10247694.html