Lecture 5: Python - Princeton University
Lecture 5:
Python
PYTHON
208
Python
? developed ~1991 by Guido van Rossum
- CWI, Amsterdam => ... => Google => Dropbox
? "I was looking for a 'hobby' programming project that would keep me occupied during the week around Christmas. My office ... would be closed, but I had a home computer, and not much else on my hands. I decided to write an interpreter for the new scripting language I had been thinking about lately: a descendant of ABC that would appeal to Unix/C hackers. I chose Python as a working title for the project, being in a slightly irreverent mood (and a big fan of Monty Python's Flying Circus)."
Guido von Rossum
Python constructs
? constants, variables, types ? operators and expressions ? statements, control flow ? aggregates ? functions, libraries ? classes, objects, modules ? etc.
Constants, variables, operators
? constants
- integers, floats, True/False - `string', "string", r'...', r"...", `''potentially multi-line
string'''
no difference between single and double quotes r'...' is a raw string: doesn't interpret \ sequences within
? variables
- hold strings or numbers, as in Awk
no automatic coercions; interpretation determined by operators and context
- no declarations (almost) - variables are either global or local to a function (or class)
? operators
- mostly like C, but no ++, --, ?: - relational operators are the same for numbers and strings - string concatenation uses + - format with "fmt string" % (list of expresssions)
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- python functions file reading and writing
- python 2 7 quick reference
- all i ever needed to know about python scripting
- programming principles in python csci 503 490
- python dicts and sets inspiring innovation
- file input and output and conditionals
- lecture 5 python princeton university
- learning the pythonic way
- file input and output
- python programming scripting
Related searches
- princeton community hospital princeton wv
- princeton university admissions staff
- princeton university hospital princeton nj
- university medical center princeton nj
- princeton hospital princeton nj
- university of scranton princeton review
- princeton medical center princeton nj
- centos 6 5 python 2 7
- princeton review university rankings
- princeton university acceptance rate
- princeton university acceptance
- princeton university early decision