[ create a new paste ] login | about

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

Python, pasted on Mar 8:
1
2
3
4
5
6
def f(s, p):
    print s, p

f("abc %s" % "def",  "pos")

f("abc %s", "def", "pos")


Output:
1
2
3
4
5
abc def pos
Traceback (most recent call last):
  Line 6, in <module>
    f("abc %s", "def", "pos")
TypeError: f() takes exactly 2 arguments (3 given)


Create a new paste based on this one


Comments: