标签:inf print 变量 输出 form bsp 格式化输出 input mat
变量
name = wwjun
Name2 = “wwjun”
print (“name,Name2”)
用户交互
Username = input (“username:”)
Password = input (“password:”)
Print(username,password)
用户名格式化输出
name = input (“name:”)
age = input (”age:”)
job = input (“job:”)
salary = input (“salary:”)
Info = ’’’
----------- info of %s ----------
Name:%s
Age:%s
Job:%s
Salary:%s
’’’ % (name,name,age,job,salary) –
第二种
Info2 = ’’’
------------- info of {_name} -----------
Name:{_name}
Age:{_age}
Job:{_job}
Salary:{_salary}
’’’ .format(_name=name,
_age=age,
_job=job,
_Salary=salary)
Print(info2)
标签:inf print 变量 输出 form bsp 格式化输出 input mat
原文地址:http://www.cnblogs.com/bjwwjun/p/7118863.html