Method One:
1 #Author:yebo2Name = input ("Name:")3age = Int (input ("Age :"))4 Print(Type (age))5Job = input ("Job:")6salary = Int (input ("Salary:"))7 8 #format Output Method one9info =" "Ten --------Info of%s------- One name:%s A age:%d - job:%s - salary:%d the " "% (name, name,age,job,salary)
Method Two:
1 #Author:yebo2Name = input ("Name:")3age = Int (input ("Age :"))4 Print(Type (age))5Job = input ("Job:")6salary = Int (input ("Salary:"))7 8 #format Output Method two9Info3 =" "Ten -------Info3 of {0}------- One name:{0} A Age:{1} - job:{2} - Salary:{3} the " ". Format (name,age,job,salary)
Method Three (recommended):
1 #Author:yebo2Name = input ("Name:")3age = Int (input ("Age :"))4 Print(Type (age))5Job = input ("Job:")6salary = Int (input ("Salary:"))7 8 #format the output method of three9Info2 =" "Ten -------Info2 of {_name}------- One Name:{_name} A Age:{_age} - Job:{_job} - Salary:{_salary} the " ". Format (_name = Name,_age = Age,_job = Job,_salary = salary)
Formatted output of Python input and output