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)

Python小代码_2_格式化输出

上一篇:$gopath not set的解决办法


下一篇:Python基础篇(格式化输出,运算符,编码):