读书人

Python 字典与字符串组合输出的例子

发布时间: 2012-12-27 10:17:10 作者: rapoo

Python 字典与字符串结合输出的例子

在字典中使用字符串格式符的方法,用字典参数来简化print语句:

?????

dict1={'howmany':1,'where':'wuhan'};print "%(where)s has %(howmany)s bridge" % dict1

?

读书人网 >perl python

热点推荐