Skip to content

Instantly share code, notes, and snippets.

@jcsalterego
Created June 19, 2009 18:27
Show Gist options
  • Select an option

  • Save jcsalterego/132773 to your computer and use it in GitHub Desktop.

Select an option

Save jcsalterego/132773 to your computer and use it in GitHub Desktop.
$ python
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1 + 2
3
>>> def foo(bar0:
File "<stdin>", line 1
def foo(bar0:
^
SyntaxError: invalid syntax
>>> def foo(bar):
... return "string %s ftw!" % bar
...
>>> foo("interpolation")
'string interpolation ftw!'
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment