在字典中使用字符串格式符的方法,用字典参数来简化print语句: dict1={'howmany':1,'where':'wuhan'}; print "%(where)s has %(howmany)s bridge" % dict1