Wednesday, November 25, 2009

byte of python

After searching for a good tutorial for python beginners, I found this one here. In that 118 pages pdf file, I went through the first 20 very quickly and then finally begin to learn some python. So here is some of my class notes. I have a google notebook, but not quite like it though.

* ctrl-d or ctrl-z to quit Python (I really wish I knew this one before.)
* comment symbol is #
* ' and '' are interchangeable, escape sequences for them is \ and \\
* \n new line, \t tab
* add "r" before expression to indicate raw string
* implicit line join using \
* Python is a very flexible language, 'a'+'b' gives 'ab' (first time I see something like this)
* Boolean NOT, AND, OR are not, and, or (different with R)

1 comment: