Changes in Python
时间:2010-09-08 来源:greencolor
Python 3.0
for x in range(1,11): print '{0:2d} {1:3d} {2:4d}'.format(x, x*x, x*x*x)
Python 2.5
for x in range(1,11): print '%2d %3d %4d' % (x, x*x, x*x*x)
相关阅读 更多 +
时间:2010-09-08 来源:greencolor
Python 3.0
for x in range(1,11): print '{0:2d} {1:3d} {2:4d}'.format(x, x*x, x*x*x)
Python 2.5
for x in range(1,11): print '%2d %3d %4d' % (x, x*x, x*x*x)