Python小代码_2_格式化输出

Python小代码_2_格式化输出

name = input("name:")
age = input("age:")
job = input("job:")
salary = input("salary:")

msg = '''
--------- info of %s ---------
Name: %s
Age: %s
Job: %s
Salary: %s
--------- end ---------
''' % (name, name, age, job, salary)

print(msg)

 

posted @ 2018-02-02 15:06  守护窗明守护爱  阅读(167)  评论(0编辑  收藏  举报