fra*_*sua 2 python tuples string-formatting iterable-unpacking
有没有办法在Python 2.5中做这样的事情:
b = ('{!s}'*3)
b.format(*[i for i in xrange (3)])
Run Code Online (Sandbox Code Playgroud)
因为这不起作用:
b = ('%s'*3)
b % (*[i for i in xrange (3)])
Run Code Online (Sandbox Code Playgroud)