# 作者 : liuxing # 日期 : 2017-12-25 # 格式化输出 name=input("name:") age=input("age:") job=input("job:") salary=input("salary:") msg=""" ------info of %s--------- age = %s job = %s salary= %s ------end---------------- """ % (name,age,job,salary) print(msg)
结果: name:liuxing age:35 job:iter salary:10w ------info of liuxing--------- age = 35 job = iter salary= 10w ------end----------------