python基础:输入、打印
name = input("name:")
age = int(input("age:")) #integer整型
job = input("job:")
salary= input("salary:")
info1 = '''
-------- info of %s
Name:%s
Age:%d
Job:%s
salary:%s
''' %(name,name,age,job,salary)
print(info1)
info2 = '''
-------- info of {_name}
Name:{_name}
Age:{_age}
Job:{_job}
salary:{_salary}
''' . format(_name=name,
_age=age,
_job=job,
_salary=salary)
print(info2)
info3 = '''
-------- info of {0}
Name:{0}
Age:{1}
Job:{2}
salary:{3}
''' .format(name,name,age,job,salary)
print(info3)