Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
************************************************** **************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet.
************************************************** **************
IDLE 1.2.2
'aja bajae'>>h = "aja baja"
h += 'e'
h
'aja bajaea'>>h = h+'a'
h
'foo'>>a = b = "foo"
a
'foo'>>b
True>>a==b
35018400>>id(a)
35018400>>id(b)
(35110112, 'foobar')>>a += "bar"
id(a),a
(35018400, 'foo')>>id(b),b
Traceback (most recent call last):>>fac
File "<pyshell#14>", line 1, in <module>
fac
NameError: name 'fac' is not defined
Traceback (most recent call last):>>factorial
File "<pyshell#15>", line 1, in <module>
factorial
NameError: name 'factorial' is not defined
<module 'math' (built-in)>>>import math
math
Traceback (most recent call last):>>math.factorial
File "<pyshell#18>", line 1, in <module>
math.factorial
AttributeError: 'module' object has no attribute 'factorial'
Traceback (most recent call last):>>math.fac
File "<pyshell#19>", line 1, in <module>
math.fac
AttributeError: 'module' object has no attribute 'fac'
['__doc__', '__name__', 'acos', 'asin', 'atan', 'atan2', 'ceil',>>dir(math)
'cos', 'cosh', 'degrees', 'e', 'exp', 'fabs', 'floor', 'fmod',
'frexp', 'hypot', 'ldexp', 'log', 'log10', 'modf', 'pi', 'pow',
'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh']
<built-in function pow>>>pow
Traceback (most recent call last):>>tan
File "<pyshell#22>", line 1, in <module>
tan
NameError: name 'tan' is not defined
<built-in function tan>>>math.tan
return a+b>>def build(a,b):
(5, 4)>>build(5,4)
a=x+y>>def build(x,y):
return a
9>>build(5,4)
return n + p>>def b(n, p):
11>>b(1, 10)
return n+p>>def b(n,p):
7>>b(5,2)
return a+b>>def build(x,y):
Traceback (most recent call last):>>build(5,4)
File "<pyshell#44>", line 1, in <module>
build(5,4)
File "<pyshell#43>", line 2, in build
return a+b
TypeError: cannot concatenate 'str' and 'function' objects
yreturn x+>>def build(x,y):
SyntaxError: invalid syntax
return x+y>>def build(x,y):
9>>build(5,4)
return a+b>>def build(a,b):
9>>build(5,4)
>>>
wtf was this in the middle!?
return a+b>>def build(a,b):
(5, 4)>>build(5,4)