比如:test={'3':'hello', 3:99}"%(3)s" % test #输出的是‘hello'
那我怎么格式化输出99呢?
对于你这种方式,dict只支持字符串形式的key,对于int类型,你可以直接取取
"%d" % test[3]