其中,最后一句 print 有点看不太明白,{0} == {1}是什么意思呢? 请各位大神帮忙解释一下,多谢。
|      1co3site      2016-07-01 17:29:11 +08:00 "{0} == {1}".format(key, value)  ->   str.format(key, value) | 
|  |      2mgna17      2016-07-01 17:29:38 +08:00 就是个替换呗,这里的 {0}, {1} 分别对应 format 中的参数 format(...) method of builtins.str instance S.format(*args, **kwargs) -> str Return a formatted version of S, using substitutions from args and kwargs. The substitutions are identified by braces ('{' and '}'). | 
|  |      3Allianzcortex      2016-07-01 20:35:40 +08:00 等价于 print'{} == {}'.format(key,value) 比 print '%s == %s' %(key,value) 要好 | 
|  |      4cloverstd      2016-07-01 20:40:31 +08:00 其实还有 print("{key} == {value}".format(key=key, value=value)) | 
|  |      5yexiaoxing      2016-07-01 20:57:22 +08:00 via iPad  1 | 
|      6linuxchild      2016-07-02 10:29:39 +08:00 via Android 大括号和双等是分开的……说起来这个执行一下不就知道了吗 |