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)