[ create a new paste ] login | about

Link: http://codepad.org/ys58xloi    [ raw code | output | fork ]

Python, pasted on May 16:
1
2
3
print("display statement")
print("display statement {}".format("string"))
print("display {0} {1} {2}".format(1,"a","abc"))


Output:
1
2
3
4
5
display statement
Traceback (most recent call last):
  Line 2, in <module>
    print("display statement {}".format("string"))
AttributeError: 'str' object has no attribute 'format'


Create a new paste based on this one


Comments: