I am using Python 2.5.2
>>> for x in range(1,11):
print '{0:2d} {1:3d} {2:4d}'.format(x, x*x, x*x*x)
Traceback (most recent call last): File "", line 2, in print '{0:2d} {1:3d} {2:4d}'.format(x, x*x, x*x*x) AttributeError: 'str' object has no attribute 'format'
I am not getting the problem
When i did dir('hello') there was no format attribute.
How can i solve this ?