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 princeton university
- python programming 1 variables loops and input output
- lab python programming review
- beyond the basic stuff with python
- computer orange template
- lecture 8 lists and mutability
- new syllabus
- comparing sas and python a coder s perspective
- x86 assembly programming mwftr
- introduction to python
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