6. Position
May 2013
Position
May 2012
Delta in
Position
Programming Language
1 1 = C
2 2 = Java
3 4 ↑ Objective-C
4 3 ↓ C++
5 5 = C#
6 6 = PHP
7 7 = Visual Basic
8 8 = Python
9 9 = Perl
10 11 ↑ Ruby
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Top Language in TIOBE
28. $$ python -ic “”$ python -ic “”
>>>
$ python -ic “”
>>> import this
Zen of Python
29. $$ python -ic “”$ python -ic “”
>>>
$ python -ic “”
>>> import this
$ python -ic “”
>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to
>>> import this
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to
break the rules.
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to
break the rules.
Although practicality beats purity.
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to
break the rules.
Although practicality beats purity.
Errors should never pass silently.
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to
break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to
break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to
break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the
temptation to guess.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to
break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the
temptation to guess.
There should be one-- and preferably only
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to
break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the
temptation to guess.
There should be one-- and preferably only
one --obvious way to do it.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to
break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the
temptation to guess.
There should be one-- and preferably only
one --obvious way to do it.
Although that way may not be obvious at
Readability counts.
Special cases aren't special enough to
break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the
temptation to guess.
There should be one-- and preferably only
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Special cases aren't special enough to
break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the
temptation to guess.
There should be one-- and preferably only
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the
temptation to guess.
There should be one-- and preferably only
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
Although never is often better than *right*
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the
temptation to guess.
There should be one-- and preferably only
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
Although never is often better than *right*
now.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the
temptation to guess.
There should be one-- and preferably only
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
Although never is often better than *right*
now.
If the implementation is hard to explain,
Unless explicitly silenced.
In the face of ambiguity, refuse the
temptation to guess.
There should be one-- and preferably only
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
Although never is often better than *right*
now.
If the implementation is hard to explain,
it's a bad idea.
In the face of ambiguity, refuse the
temptation to guess.
There should be one-- and preferably only
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
Although never is often better than *right*
now.
If the implementation is hard to explain,
it's a bad idea.
If the implementation is easy to explain,
temptation to guess.
There should be one-- and preferably only
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
Although never is often better than *right*
now.
If the implementation is hard to explain,
it's a bad idea.
If the implementation is easy to explain,
it may be a good idea.
There should be one-- and preferably only
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
Although never is often better than *right*
now.
If the implementation is hard to explain,
it's a bad idea.
If the implementation is easy to explain,
it may be a good idea.
Namespaces are one honking great idea --
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
Although never is often better than *right*
now.
If the implementation is hard to explain,
it's a bad idea.
If the implementation is easy to explain,
it may be a good idea.
Namespaces are one honking great idea --
let's do more of those!
one --obvious way to do it.
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
Although never is often better than *right*
now.
If the implementation is hard to explain,
it's a bad idea.
If the implementation is easy to explain,
it may be a good idea.
Namespaces are one honking great idea --
let's do more of those!
Although that way may not be obvious at
first unless you're Dutch.
Now is better than never.
Although never is often better than *right*
now.
If the implementation is hard to explain,
it's a bad idea.
If the implementation is easy to explain,
it may be a good idea.
Namespaces are one honking great idea --
let's do more of those!
>>>
Zen of Python
35. Python 2.x Python 3.x
2.7.x is the latest version under development
more 3-party library 2to3.py
built-in on many OS more supported unicode
the past in someday the future in someday
41. Environment
For Windows User,
Download From
http://www.python.org/download/
if you want to launch Python in command line,
add the path of Python binary file into PATH variable.
48. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
Check Version of Python
49. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
Check Version of Python
52. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
Interactive Shell
53. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
Interactive Shell
prompt
54. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
Interactive Shell
prompt
means that your turn!
57. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
Interactive Shell
58. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
Interactive Shell
59. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
Interactive Shell
60. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
Interactive Shell
61. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
Interactive Shell
62. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Interactive Shell
63. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Interactive Shell
64. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
Interactive Shell
65. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>>
Interactive Shell
66. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>>
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
Interactive Shell
67. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>>
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>>
Interactive Shell
68. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>>
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>>
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
Interactive Shell
69. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>>
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>>
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
...
Interactive Shell
70. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>>
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>>
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
...
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
Interactive Shell
71. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>>
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>>
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
...
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
...
Interactive Shell
72. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>>
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>>
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
...
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
...
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
...
0
1
2
3
4
>>>
Interactive Shell
73. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>>
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>>
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
...
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
...
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
...
0
1
2
3
4
>>>
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
...
0
1
2
3
4
>>> exit()
Interactive Shell
74. $$ python$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>>
$ python
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>>
Python 2.7.5 (default, May 20 2013,
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>>
23:41:46)
[GCC 4.2.1 Compatible Apple LLVM 4.2
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>>
(clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
...
Type "help", "copyright", "credits" or
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
"license" for more information.
>>> 1 + 2 + 3
6
>>> “Hello World”
‘Hello World’
>>> x = 100
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
...
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
...
0
1
2
3
4
>>>
>>> y = 200
>>> x + y
300
>>> for i in range(5):
... print i
...
0
1
2
3
4
>>> exit()
>>> x + y
300
>>> for i in range(5):
... print i
...
0
1
2
3
4
>>> exit()
$
Interactive Shell
81. A Python Code
def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
9x9table.py
82. script language
def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
no specified entry point
85. $
script language
$ python 9x9table.py$ python 9x9table.py
2 x 1 = 2
2 x 2 = 4
2 x 3 = 6
2 x 4 = 8
2 x 5 = 10
2 x 6 = 12
2 x 7 = 14
2 x 8 = 16
2 x 9 = 18
3 x 1 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4 = 36
8 x 2 = 16
8 x 3 = 24
8 x 4 = 32
8 x 5 = 40
8 x 6 = 48
8 x 7 = 56
8 x 8 = 64
8 x 9 = 72
9 x 1 = 9
9 x 2 = 18
9 x 3 = 27
9 x 4 = 36
9 x 5 = 45
8 x 3 = 24
8 x 4 = 32
8 x 5 = 40
8 x 6 = 48
8 x 7 = 56
8 x 8 = 64
8 x 9 = 72
9 x 1 = 9
9 x 2 = 18
9 x 3 = 27
9 x 4 = 36
9 x 5 = 45
9 x 6 = 54
8 x 4 = 32
8 x 5 = 40
8 x 6 = 48
8 x 7 = 56
8 x 8 = 64
8 x 9 = 72
9 x 1 = 9
9 x 2 = 18
9 x 3 = 27
9 x 4 = 36
9 x 5 = 45
9 x 6 = 54
9 x 7 = 63
8 x 5 = 40
8 x 6 = 48
8 x 7 = 56
8 x 8 = 64
8 x 9 = 72
9 x 1 = 9
9 x 2 = 18
9 x 3 = 27
9 x 4 = 36
9 x 5 = 45
9 x 6 = 54
9 x 7 = 63
9 x 8 = 72
8 x 6 = 48
8 x 7 = 56
8 x 8 = 64
8 x 9 = 72
9 x 1 = 9
9 x 2 = 18
9 x 3 = 27
9 x 4 = 36
9 x 5 = 45
9 x 6 = 54
9 x 7 = 63
9 x 8 = 72
9 x 9 = 81
8 x 7 = 56
8 x 8 = 64
8 x 9 = 72
9 x 1 = 9
9 x 2 = 18
9 x 3 = 27
9 x 4 = 36
9 x 5 = 45
9 x 6 = 54
9 x 7 = 63
9 x 8 = 72
9 x 9 = 81
$
86. If you need a main function
as entry point,
if __name__ == “__main__”:
print “Hello World!”
87. If you need a main function
as entry point,
if __name__ == “__main__”:
print “Hello World!”
88. If you need a main function
as entry point,
if __name__ == “__main__”:
print “Hello World!”
and write all statements after it.
89. def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
variable
can be used without declaration
90. def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
variable
def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
can be used without declaration
91. def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
scope
use whitespace to identify scope
92. def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
scope
def mul(x, y):
ret = x * y
return ret
for i in range(10)[2:]:
for j in range(10)[1:]:
print "{0} x {1} = {2}".format(i, j,
mul(i, j))
use whitespace to identify scope