标签:format pass job inpu int author username mat code
# Author:liuzhongchang username=input("username") password=input("password") print(username,password) name=input("name:") age=input("age:") job=input("job:") salary=input("salary:") info=‘‘‘ ------info of %s----------- name:%s age:%s job:%s salary:%s ‘‘‘%(name,name,age,job,salary) 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,age,job,salary) print(info3)
标签:format pass job inpu int author username mat code
原文地址:http://www.cnblogs.com/liuzhongchang/p/7826306.html