python格式化输出
name="lixiaoming"
age=12
#单个
print ("你好%s" %name)
#多个
print ("名字是%s,年龄是%s" %(name,age))
#format 基本语法是通过 {} 和 : 来代替以前的 %
print ("名字是{myname},年龄是{myage}".format(myname="wangdali",myage=52))
logging
logging.info("url: {url}".format(url=url))
logging.info("name:{name}".format(name='lixia'))
res="fail"
res1="suc"
logging.info("测试结果:{}".format("pass"))
logging.info("测试结果:{},{}".format(res,"res1"))