Repository navigation
Expand file tree
/
Copy pathPractical Python Notes
More file actions
37 lines (20 loc) · 1.69 KB
/
Copy pathPractical Python Notes
File metadata and controls
37 lines (20 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Practical Python
What is Python?
Python is an interpreted high level programming language. It is often classified as a “scripting language” and is considered similar to languages such as Perl, Tcl, or Ruby. The syntax of Python is loosely inspired by elements of C programming.
Python was created by Guido van Rossum around 1990 who named it in honor of Monty Python.
Why was Python created?
In the words of Python’s creator:
My original motivation for creating Python was the perceived need for a higher level language in the Amoeba [Operating Systems] project. I realized that the development of system administration utilities in C was taking too long. Moreover, doing these things in the Bourne shell wouldn’t work for a variety of reasons. … So, there was a need for a language that would bridge the gap between C and the shell.
Guido van Rossum
If your work environment requires the use of an HTTP proxy server, you may need to set the HTTP_PROXY environment variable to make this part of the exercise work. For example:
>>> import os
>>> os.environ['HTTP_PROXY'] = 'http://yourproxy.server.com'
Interactive Mode
When you start Python, you get an interactive mode where you can experiment.
If you start typing statements, they will run immediately. There is no edit/compile/run/debug cycle.
This so-called read-eval-print-loop (or REPL) is very useful for debugging and exploration.
Python is dynamically typed. The perceived “type” of a variable might change as a program executes depending on the current value assigned to it.
Python is case sensitive. Upper and lower-case letters are considered different letters. These are all different variables:
name = 'Jake'
Name = 'Elwood'
NAME = 'Guido'