An introduction to the programming language Python. This talk was written for a hackday centred around Django, and given to a group of software developers who were experienced in PHP but had minimal knowledge of Python.
Oriented, Procedural, Functional • Easy to interface with C/ObjC/Java/Fortran • Easy-ish to interface with C++ (via SWIG) • Great interactive environment (http://tdc-www.harvard.edu/Python.pdf) 2
+ time + ", " + name ... >>> greet("Freda") Good day, Freda >>> greet("Bobby", "morning") Good morning, Bobby >>> greet(name="Jenny", time="evening") Good evening, Jenny 42
>>> def what_are_flowers(**kwargs): ... for k, v in kwargs: ... print v + " flowers are " + k ... >>> what_are_flowers(**flowers) 3 flowers are poppy 2 flowers are rose 45