标签:dig put -- 数据 int bsp git 访问 nbsp
name = input("Name:")
age = int(input("Age:")) #类型强制转换
job = input("Job:")
salary = input("Salary:")
if salary.isdigit(): # .isdigit()用于判断数据是不是数字
salary = int(salary)
msg = ‘‘‘
----------info of %s ----------
Name :%s
Age :%d
Job :%s
Salary : %f
----------end----------
‘‘‘ % (name,name,age,job,salary,age) #字符格式化输出
print(msg)
标签:dig put -- 数据 int bsp git 访问 nbsp
原文地址:https://www.cnblogs.com/styleonme/p/11111668.html