标签:info bsp form format pytho 拼接 mat int orm
拼接:
name=zhuhuan
age=23
salary=333
info=‘‘‘
----- info of %s-----
age:%s
name:%s
salary:%s
%(name,age,name,salary)
‘‘‘
info2=‘‘‘
----- info of {_name}-----
age:{_age}
name:{_name}
salary:{_salary}
‘‘‘.format(_name=name,_age=age,_salary=salary)
info3=‘‘‘
----- info of {0}-----
age:{1}
name:{0}
salary:{2}
‘‘‘.format(name,age,salary)
print(info,info2,info3)
标签:info bsp form format pytho 拼接 mat int orm
原文地址:http://www.cnblogs.com/zh-20170913/p/7517813.html