Last login: Fri Nov 3 10:31:30 on console Welcome to Darwin! mdhcp5-79:~ mahoney$ python Python 2.3.5 (#1, Mar 20 2005, 20:38:20) [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = "hello" >>> a.upper() 'HELLO' >>> a 'hello' >>> a = a.upper() >>> a 'HELLO' >>> a.upper() 'HELLO' >>> b = ['one', 'two', 'three'] >>> b.sort() >>> b ['one', 'three', 'two'] >>> "abcabcabcabc'.replace('ab', 'TLE') File "", line 1 "abcabcabcabc'.replace('ab', 'TLE') ^ SyntaxError: EOL while scanning single-quoted string >>> "abcabcabc".replace('ab', 'THE') 'THEcTHEcTHEc' >>> 'abcabcabc'.replace('a', '') 'bcbcbc' >>> help(del) File "", line 1 help(del) ^ SyntaxError: invalid syntax >>> a = [ 'one', 'two', 'three' ] >>> del a[0] >>> a ['two', 'three'] >>> b = "1234" >>> b[0] '1' >>> del b[0] Traceback (most recent call last): File "", line 1, in ? TypeError: object doesn't support item deletion >>> def loop_10_times(): ... File "", line 2 ^ IndentationError: expected an indented block >>> def loop_10_times( func ): ... for i in range(10): ... func() ... >>> def print_something(): ... print "hi" ... >>> print_something() hi >>> print_something >>> loop_10_times( print_something ) hi hi hi hi hi hi hi hi hi hi >>>