Variables and Expressions
Expressions
Standard mathematical operators work like other languages:
3 + 5 3 + (5*4) 3 ** 2 'Hello' + 'World'
Variable assignment
a = 4 << 3 b = a * 4.5 c = (a+b)/2.5 a = "Hello World"
Variables are dynamically typed (No explicit typing, types may change during execution).
Variables are just names for an object. Not tied to a memory location like in C.
<<<
O'Reilly OSCON 2000, Advanced Python Programming, Slide 7
July 17, 2000, beazley@cs.uchicago.edu
>>>