Slide 1

Slide 1 text

@ Programming Language 2013 Python 郭⾄至軒(KuoE0) [email protected] KuoE0.ch

Slide 2

Slide 2 text

Latest update: Jan 10, 2014, Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) http://creativecommons.org/licenses/by-sa/3.0/

Slide 3

Slide 3 text

What is Python?

Slide 4

Slide 4 text

What is Python? a programming language

Slide 5

Slide 5 text

What is Python? easy to Read easy to Learn easy to Write a programming language

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

Javascript Ruby Java Python Shell PHP C C++ Perl Objective-C 0% 5% 10% 15% 20% 25% 3% 4% 5% 6% 7% 8% 8% 8% 12% 21% Top Languages in Github https://github.com/languages

Slide 8

Slide 8 text

Javascript Ruby Java Python Shell PHP C C++ Perl Objective-C 0% 5% 10% 15% 20% 25% 3% 4% 5% 6% 7% 8% 8% 8% 12% 21% Top Languages in Github https://github.com/languages

Slide 9

Slide 9 text

What does the logo mean?

Slide 10

Slide 10 text

界 Kingdom 動物界 Animalia ⾨門 Phylum 脊索動物⾨門 Chordata 綱 Class 爬蟲科 Reptilia ⺫⽬目 Order 有鱗⺫⽬目 Squamata 科 Family 蟒科 Pythonidae 屬 Genus 蟒屬 Python

Slide 11

Slide 11 text

http://wallpapers.free-review.net/15__Tree_python.htm

Slide 12

Slide 12 text

http://wallpapers.free-review.net/15__Tree_python.htm

Slide 13

Slide 13 text

More About Python...

Slide 14

Slide 14 text

More About Python... Interpreted Language Do not need to compile!

Slide 15

Slide 15 text

Compiled Language compiler execute

Slide 16

Slide 16 text

Interpreted Language execute But, interpret in execution time. And, it would be slow...

Slide 17

Slide 17 text

More About Python... Object-Oriented Language Everything in Python is object!

Slide 18

Slide 18 text

number function string list Object

Slide 19

Slide 19 text

number function string list Object

Slide 20

Slide 20 text

overloading polymorphism inheritance multiple inheritance

Slide 21

Slide 21 text

More About Python... Imperative Programming Generic Programming Functional Programming

Slide 22

Slide 22 text

Philosophy

Slide 23

Slide 23 text

There should be one— and preferably only one —obvious way to do it. Philosophy

Slide 24

Slide 24 text

There should be one— and preferably only one —obvious way to do it. Philosophy There should be one— and preferably only one —obvious way to do it.

Slide 25

Slide 25 text

$ Zen of Python

Slide 26

Slide 26 text

$ $ python -ic “” Zen of Python

Slide 27

Slide 27 text

$ $ python -ic “” $ python -ic “” >>> Zen of Python

Slide 28

Slide 28 text

$ $ python -ic “” $ python -ic “” >>> $ python -ic “” >>> import this Zen of Python

Slide 29

Slide 29 text

$ $ 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

Slide 30

Slide 30 text

Current Situation

Slide 31

Slide 31 text

Current Situation Python 2.x Python 3.x

Slide 32

Slide 32 text

Current Situation Python 2.x Python 3.x Coexist!

Slide 33

Slide 33 text

Current Situation Python 2.x Python 3.x Coexist!

Slide 34

Slide 34 text

Current Situation Python 2.x Python 3.x Coexist! backwards-incompatible

Slide 35

Slide 35 text

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

Slide 36

Slide 36 text

http://www.ibm.com/developerworks/cn/linux/l-python3-1/ Python 3 的新特性

Slide 37

Slide 37 text

Python 2.x

Slide 38

Slide 38 text

Python 2.x Today, Let’s Talk About

Slide 39

Slide 39 text

Environment

Slide 40

Slide 40 text

Environment For Unix-like OS User, Python 2.x is Built-in!

Slide 41

Slide 41 text

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.

Slide 42

Slide 42 text

$ Check Version of Python

Slide 43

Slide 43 text

$ Check Version of Python $ python --version

Slide 44

Slide 44 text

$ Check Version of Python $ python --version $ python --version Python 2.7.5

Slide 45

Slide 45 text

$ Check Version of Python $ python --version $ python --version Python 2.7.5 2.7.5 is released on May 15, 2013

Slide 46

Slide 46 text

$ Check Version of Python

Slide 47

Slide 47 text

$ $ python Check Version of Python

Slide 48

Slide 48 text

$ $ 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

Slide 49

Slide 49 text

$ $ 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

Slide 50

Slide 50 text

$ Interactive Shell

Slide 51

Slide 51 text

$ $ python Interactive Shell

Slide 52

Slide 52 text

$ $ 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

Slide 53

Slide 53 text

$ $ 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

Slide 54

Slide 54 text

$ $ 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!

Slide 55

Slide 55 text

$ Interactive Shell

Slide 56

Slide 56 text

$ $ python Interactive Shell

Slide 57

Slide 57 text

$ $ 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

Slide 58

Slide 58 text

$ $ 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

Slide 59

Slide 59 text

$ $ 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

Slide 60

Slide 60 text

$ $ 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

Slide 61

Slide 61 text

$ $ 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

Slide 62

Slide 62 text

$ $ 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

Slide 63

Slide 63 text

$ $ 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

Slide 64

Slide 64 text

$ $ 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

Slide 65

Slide 65 text

$ $ 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

Slide 66

Slide 66 text

$ $ 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

Slide 67

Slide 67 text

$ $ 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

Slide 68

Slide 68 text

$ $ 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

Slide 69

Slide 69 text

$ $ 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

Slide 70

Slide 70 text

$ $ 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

Slide 71

Slide 71 text

$ $ 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

Slide 72

Slide 72 text

$ $ 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

Slide 73

Slide 73 text

$ $ 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

Slide 74

Slide 74 text

$ $ 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

Slide 75

Slide 75 text

Hello World!

Slide 76

Slide 76 text

Hello World! if __name__ == “__main__”: print “Hello World!” helloworld.py

Slide 77

Slide 77 text

$ Hello World!

Slide 78

Slide 78 text

$ Hello World! $ python helloworld.py

Slide 79

Slide 79 text

$ Hello World! $ python helloworld.py $ python helloworld.py Hello World! $

Slide 80

Slide 80 text

A Python Code

Slide 81

Slide 81 text

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

Slide 82

Slide 82 text

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

Slide 83

Slide 83 text

$ script language

Slide 84

Slide 84 text

$ script language $ python 9x9table.py

Slide 85

Slide 85 text

$ 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 = 3 3 x 2 = 6 3 x 3 = 9 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 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 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 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 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 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 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 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 2 x 5 = 10 2 x 6 = 12 2 x 7 = 14 2 x 8 = 16 2 x 9 = 18 3 x 1 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 2 x 6 = 12 2 x 7 = 14 2 x 8 = 16 2 x 9 = 18 3 x 1 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 2 x 7 = 14 2 x 8 = 16 2 x 9 = 18 3 x 1 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 2 x 8 = 16 2 x 9 = 18 3 x 1 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 2 x 9 = 18 3 x 1 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 3 x 1 = 3 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 3 x 2 = 6 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 3 x 3 = 9 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 3 x 4 = 12 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 3 x 5 = 15 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 3 x 6 = 18 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 3 x 7 = 21 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 3 x 8 = 24 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 3 x 9 = 27 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 4 x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 4 x 4 = 16 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 4 x 5 = 20 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 4 x 6 = 24 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 4 x 7 = 28 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 4 x 8 = 32 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 4 x 9 = 36 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 5 x 3 = 15 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 5 x 4 = 20 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 5 x 5 = 25 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 5 x 6 = 30 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 5 x 7 = 35 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 5 x 8 = 40 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 5 x 9 = 45 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 6 x 1 = 6 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 6 x 2 = 12 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 6 x 3 = 18 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 6 x 4 = 24 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 6 x 5 = 30 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 6 x 6 = 36 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 6 x 7 = 42 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 6 x 8 = 48 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 8 x 2 = 16 6 x 9 = 54 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 8 x 2 = 16 8 x 3 = 24 7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 8 x 2 = 16 8 x 3 = 24 8 x 4 = 32 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 8 x 2 = 16 8 x 3 = 24 8 x 4 = 32 8 x 5 = 40 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 8 x 2 = 16 8 x 3 = 24 8 x 4 = 32 8 x 5 = 40 8 x 6 = 48 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 8 x 2 = 16 8 x 3 = 24 8 x 4 = 32 8 x 5 = 40 8 x 6 = 48 8 x 7 = 56 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 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 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 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 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 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 7 x 8 = 56 7 x 9 = 63 8 x 1 = 8 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 7 x 9 = 63 8 x 1 = 8 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 8 x 1 = 8 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 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 $

Slide 86

Slide 86 text

If you need a main function as entry point, if __name__ == “__main__”: print “Hello World!”

Slide 87

Slide 87 text

If you need a main function as entry point, if __name__ == “__main__”: print “Hello World!”

Slide 88

Slide 88 text

If you need a main function as entry point, if __name__ == “__main__”: print “Hello World!” and write all statements after it.

Slide 89

Slide 89 text

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

Slide 90

Slide 90 text

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

Slide 91

Slide 91 text

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

Slide 92

Slide 92 text

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

Slide 93

Slide 93 text

You can use to identify scopes.

Slide 94

Slide 94 text

You can use one space two spaces three spaces four spaces lots of spaces to identify scopes.

Slide 95

Slide 95 text

You can use one space two spaces three spaces four spaces lots of spaces one tab two tabs three tabs four tabs lots of tabs to identify scopes.

Slide 96

Slide 96 text

But, you should unify the style!

Slide 97

Slide 97 text

Built-in Data Type

Slide 98

Slide 98 text

Null None >>>

Slide 99

Slide 99 text

Null None >>> >>> None

Slide 100

Slide 100 text

Null None >>> >>> None >>> None >>>

Slide 101

Slide 101 text

Boolean True False >>>

Slide 102

Slide 102 text

Boolean True False >>> >>> 1 == 1

Slide 103

Slide 103 text

Boolean True False >>> >>> 1 == 1 >>> 1 == 1 True >>>

Slide 104

Slide 104 text

Boolean True False >>> >>> 1 == 1 >>> 1 == 1 True >>> >>> 1 == 1 True >>> 1 != 1

Slide 105

Slide 105 text

Boolean True False >>> >>> 1 == 1 >>> 1 == 1 True >>> >>> 1 == 1 True >>> 1 != 1 >>> 1 == 1 True >>> 1 != 1 False >>>

Slide 106

Slide 106 text

Boolean True False >>> >>> 1 == 1 >>> 1 == 1 True >>> >>> 1 == 1 True >>> 1 != 1 >>> 1 == 1 True >>> 1 != 1 False >>> >>> 1 == 1 True >>> 1 != 1 False >>> True

Slide 107

Slide 107 text

Boolean True False >>> >>> 1 == 1 >>> 1 == 1 True >>> >>> 1 == 1 True >>> 1 != 1 >>> 1 == 1 True >>> 1 != 1 False >>> >>> 1 == 1 True >>> 1 != 1 False >>> True >>> 1 == 1 True >>> 1 != 1 False >>> True True >>>

Slide 108

Slide 108 text

Boolean True False >>> >>> 1 == 1 >>> 1 == 1 True >>> >>> 1 == 1 True >>> 1 != 1 >>> 1 == 1 True >>> 1 != 1 False >>> >>> 1 == 1 True >>> 1 != 1 False >>> True >>> 1 == 1 True >>> 1 != 1 False >>> True True >>> >>> 1 == 1 True >>> 1 != 1 False >>> True True >>> False

Slide 109

Slide 109 text

Boolean True False >>> >>> 1 == 1 >>> 1 == 1 True >>> >>> 1 == 1 True >>> 1 != 1 >>> 1 == 1 True >>> 1 != 1 False >>> >>> 1 == 1 True >>> 1 != 1 False >>> True >>> 1 == 1 True >>> 1 != 1 False >>> True True >>> >>> 1 == 1 True >>> 1 != 1 False >>> True True >>> False True >>> 1 != 1 False >>> True True >>> False False >>>

Slide 110

Slide 110 text

Boolean True False >>>

Slide 111

Slide 111 text

Boolean True False upper case >>>

Slide 112

Slide 112 text

Boolean True False upper case >>> >>> true

Slide 113

Slide 113 text

Boolean True False upper case >>> >>> true >>> true Traceback (most recent call last): File "", line 1, in NameError: name 'true' is not defined >>>

Slide 114

Slide 114 text

Initialization / Conversion True False >>>

Slide 115

Slide 115 text

Initialization / Conversion True False >>> >>> bool(1)

Slide 116

Slide 116 text

Initialization / Conversion True False >>> >>> bool(1) >>> bool(1) True >>>

Slide 117

Slide 117 text

Initialization / Conversion True False >>> >>> bool(1) >>> bool(1) True >>> >>> bool(1) True >>> bool(True)

Slide 118

Slide 118 text

Initialization / Conversion True False >>> >>> bool(1) >>> bool(1) True >>> >>> bool(1) True >>> bool(True) >>> bool(1) True >>> bool(True) True >>>

Slide 119

Slide 119 text

Initialization / Conversion True False >>> >>> bool(1) >>> bool(1) True >>> >>> bool(1) True >>> bool(True) >>> bool(1) True >>> bool(True) True >>> >>> bool(1) True >>> bool(True) True >>> bool()

Slide 120

Slide 120 text

Initialization / Conversion True False >>> >>> bool(1) >>> bool(1) True >>> >>> bool(1) True >>> bool(True) >>> bool(1) True >>> bool(True) True >>> >>> bool(1) True >>> bool(True) True >>> bool() >>> bool(1) True >>> bool(True) True >>> bool() False >>>

Slide 121

Slide 121 text

Logical Operators and and or or not not >>>

Slide 122

Slide 122 text

Logical Operators and and or or not not >>> >>> (1 == 1) and True

Slide 123

Slide 123 text

Logical Operators and and or or not not >>> >>> (1 == 1) and True >>> (1 == 1) and True True >>>

Slide 124

Slide 124 text

Logical Operators and and or or not not >>> >>> (1 == 1) and True >>> (1 == 1) and True True >>> >>> (1 == 1) and True True >>> (1 == 1) or False

Slide 125

Slide 125 text

Logical Operators and and or or not not >>> >>> (1 == 1) and True >>> (1 == 1) and True True >>> >>> (1 == 1) and True True >>> (1 == 1) or False >>> (1 == 1) and True True >>> (1 == 1) or False True >>>

Slide 126

Slide 126 text

Logical Operators and and or or not not >>> >>> (1 == 1) and True >>> (1 == 1) and True True >>> >>> (1 == 1) and True True >>> (1 == 1) or False >>> (1 == 1) and True True >>> (1 == 1) or False True >>> >>> (1 == 1) and True True >>> (1 == 1) or False True >>> not (1 == 1)

Slide 127

Slide 127 text

Logical Operators and and or or not not >>> >>> (1 == 1) and True >>> (1 == 1) and True True >>> >>> (1 == 1) and True True >>> (1 == 1) or False >>> (1 == 1) and True True >>> (1 == 1) or False True >>> >>> (1 == 1) and True True >>> (1 == 1) or False True >>> not (1 == 1) >>> (1 == 1) and True True >>> (1 == 1) or False True >>> not (1 == 1) False >>>

Slide 128

Slide 128 text

Numbers int (integer) long (long integer) float (real number) complex (complex number) 10 10L 100.0 3 + 2j -789 -789L -21.9 3 - 2j -0x111 0xFFFFFFFFF 3.20E+10 45j 0x69 -0x12321L -2.00E-08 3e+26j

Slide 129

Slide 129 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>>

Slide 130

Slide 130 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>> >>> int(10)

Slide 131

Slide 131 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>> >>> int(10) >>> int(10) 10 >>>

Slide 132

Slide 132 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>> >>> int(10) >>> int(10) 10 >>> >>> int(10) 10 >>> int(“100”)

Slide 133

Slide 133 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>> >>> int(10) >>> int(10) 10 >>> >>> int(10) 10 >>> int(“100”) >>> int(10) 10 >>> int(“100”) 100 >>>

Slide 134

Slide 134 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>> >>> int(10) >>> int(10) 10 >>> >>> int(10) 10 >>> int(“100”) >>> int(10) 10 >>> int(“100”) 100 >>> >>> int(10) 10 >>> int(“100”) 100 >>> complex(10)

Slide 135

Slide 135 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>> >>> int(10) >>> int(10) 10 >>> >>> int(10) 10 >>> int(“100”) >>> int(10) 10 >>> int(“100”) 100 >>> >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>>

Slide 136

Slide 136 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>> >>> int(10) >>> int(10) 10 >>> >>> int(10) 10 >>> int(“100”) >>> int(10) 10 >>> int(“100”) 100 >>> >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> complex(10, 3)

Slide 137

Slide 137 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>> >>> int(10) >>> int(10) 10 >>> >>> int(10) 10 >>> int(“100”) >>> int(10) 10 >>> int(“100”) 100 >>> >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> complex(10, 3) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> complex(10, 3) (10+3j) >>>

Slide 138

Slide 138 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>> >>> int(10) >>> int(10) 10 >>> >>> int(10) 10 >>> int(“100”) >>> int(10) 10 >>> int(“100”) 100 >>> >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> complex(10, 3) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> complex(10, 3) (10+3j) >>> 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> complex(10, 3) (10+3j) >>> complex(“20+5j”)

Slide 139

Slide 139 text

Initialization / Conversion data type initial int int(x) long long(x) float float(x) complex complex(x) complex(x, y) >>> >>> int(10) >>> int(10) 10 >>> >>> int(10) 10 >>> int(“100”) >>> int(10) 10 >>> int(“100”) 100 >>> >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> >>> int(10) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> complex(10, 3) 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> complex(10, 3) (10+3j) >>> 10 >>> int(“100”) 100 >>> complex(10) (10+0j) >>> complex(10, 3) (10+3j) >>> complex(“20+5j”) 100 >>> complex(10) (10+0j) >>> complex(10, 3) (10+3j) >>> complex(“20+5j”) (20+5j) >>>

Slide 140

Slide 140 text

Arithmetic Operators + addition - subtraction * multiplication / division % modular ** exponential // floor division >>>

Slide 141

Slide 141 text

Arithmetic Operators + addition - subtraction * multiplication / division % modular ** exponential // floor division >>> >>> 2**10

Slide 142

Slide 142 text

Arithmetic Operators + addition - subtraction * multiplication / division % modular ** exponential // floor division >>> >>> 2**10 >>> 2**10 1024 >>>

Slide 143

Slide 143 text

Arithmetic Operators + addition - subtraction * multiplication / division % modular ** exponential // floor division >>> >>> 2**10 >>> 2**10 1024 >>> >>> 2**10 1024 >>> 5.8 // 2

Slide 144

Slide 144 text

Arithmetic Operators + addition - subtraction * multiplication / division % modular ** exponential // floor division >>> >>> 2**10 >>> 2**10 1024 >>> >>> 2**10 1024 >>> 5.8 // 2 >>> 2**10 1024 >>> 5.8 // 2 2.0 >>>

Slide 145

Slide 145 text

Bitwise Operators & and | or ^ exclusion or >> shift right << shift left ~ not >>>

Slide 146

Slide 146 text

Bitwise Operators & and | or ^ exclusion or >> shift right << shift left ~ not >>> >>> 3 & 1

Slide 147

Slide 147 text

Bitwise Operators & and | or ^ exclusion or >> shift right << shift left ~ not >>> >>> 3 & 1 >>> 3 & 1 1 >>>

Slide 148

Slide 148 text

Bitwise Operators & and | or ^ exclusion or >> shift right << shift left ~ not >>> >>> 3 & 1 >>> 3 & 1 1 >>> >>> 3 & 1 1 >>> 1 << 10

Slide 149

Slide 149 text

Bitwise Operators & and | or ^ exclusion or >> shift right << shift left ~ not >>> >>> 3 & 1 >>> 3 & 1 1 >>> >>> 3 & 1 1 >>> 1 << 10 >>> 3 & 1 1 >>> 1 << 10 1024 >>>

Slide 150

Slide 150 text

Bitwise Operators & and | or ^ exclusion or >> shift right << shift left ~ not >>> >>> 3 & 1 >>> 3 & 1 1 >>> >>> 3 & 1 1 >>> 1 << 10 >>> 3 & 1 1 >>> 1 << 10 1024 >>> >>> 3 & 1 1 >>> 1 << 10 1024 >>> ~0

Slide 151

Slide 151 text

Bitwise Operators & and | or ^ exclusion or >> shift right << shift left ~ not >>> >>> 3 & 1 >>> 3 & 1 1 >>> >>> 3 & 1 1 >>> 1 << 10 >>> 3 & 1 1 >>> 1 << 10 1024 >>> >>> 3 & 1 1 >>> 1 << 10 1024 >>> ~0 >>> 3 & 1 1 >>> 1 << 10 1024 >>> ~0 -1 >>>

Slide 152

Slide 152 text

Comparison Operators > greater than >= greater than or equal to < less than <= less than or equal to == equal to != not equal to

Slide 153

Slide 153 text

String Contents are surrounded by single quote or double quote. >>>

Slide 154

Slide 154 text

String Contents are surrounded by single quote or double quote. >>> >>> “Hello World”

Slide 155

Slide 155 text

String Contents are surrounded by single quote or double quote. >>> >>> “Hello World” >>> “Hello World” ‘Hello World’ >>>

Slide 156

Slide 156 text

String Contents are surrounded by single quote or double quote. >>> >>> “Hello World” >>> “Hello World” ‘Hello World’ >>> >>> “Hello World!” ‘Hello World’ >>> ‘Hello World!’

Slide 157

Slide 157 text

String Contents are surrounded by single quote or double quote. >>> >>> “Hello World” >>> “Hello World” ‘Hello World’ >>> >>> “Hello World!” ‘Hello World’ >>> ‘Hello World!’ >>> “Hello World!” ‘Hello World’ >>> ‘Hello World!’ ‘Hello World’ >>>

Slide 158

Slide 158 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>>

Slide 159

Slide 159 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>> >>> “““Hello

Slide 160

Slide 160 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>> >>> “““Hello >>> “““Hello ...

Slide 161

Slide 161 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>> >>> “““Hello >>> “““Hello ... >>> “““Hello ... World!”””

Slide 162

Slide 162 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>> >>> “““Hello >>> “““Hello ... >>> “““Hello ... World!””” >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>>

Slide 163

Slide 163 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>> >>> “““Hello >>> “““Hello ... >>> “““Hello ... World!””” >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello

Slide 164

Slide 164 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>> >>> “““Hello >>> “““Hello ... >>> “““Hello ... World!””” >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ...

Slide 165

Slide 165 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>> >>> “““Hello >>> “““Hello ... >>> “““Hello ... World!””” >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... World!”””

Slide 166

Slide 166 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>> >>> “““Hello >>> “““Hello ... >>> “““Hello ... World!””” >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... World!””” >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... World!””” >>>

Slide 167

Slide 167 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>> >>> “““Hello >>> “““Hello ... >>> “““Hello ... World!””” >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... World!””” >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... World!””” >>> >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... World!””” >>> print x

Slide 168

Slide 168 text

Cross-line String Contents are surrounded by three single quotes or three double quotes. >>> >>> “““Hello >>> “““Hello ... >>> “““Hello ... World!””” >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... World!””” >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... World!””” >>> >>> “““Hello ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... World!””” >>> print x ... World!””” ‘Hello\nWorld!’ >>> x = “““Hello ... World!””” >>> print x Hello World! >>>

Slide 169

Slide 169 text

Initialization / Conversion >>>

Slide 170

Slide 170 text

Initialization / Conversion >>> >>> str(“I’m string”)

Slide 171

Slide 171 text

Initialization / Conversion >>> >>> str(“I’m string”) >>> str(“I’m string”) “I’m string” >>>

Slide 172

Slide 172 text

Initialization / Conversion >>> >>> str(“I’m string”) >>> str(“I’m string”) “I’m string” >>> >>> str(“I’m string”) “I’m string” >>> str(100)

Slide 173

Slide 173 text

Initialization / Conversion >>> >>> str(“I’m string”) >>> str(“I’m string”) “I’m string” >>> >>> str(“I’m string”) “I’m string” >>> str(100) >>> str(“I’m string”) “I’m string” >>> str(100) ‘100’ >>>

Slide 174

Slide 174 text

Initialization / Conversion >>> >>> str(“I’m string”) >>> str(“I’m string”) “I’m string” >>> >>> str(“I’m string”) “I’m string” >>> str(100) >>> str(“I’m string”) “I’m string” >>> str(100) ‘100’ >>> >>> str(“I’m string”) “I’m string” >>> str(100) ‘100’ >>> str(complex(10, 3))

Slide 175

Slide 175 text

Initialization / Conversion >>> >>> str(“I’m string”) >>> str(“I’m string”) “I’m string” >>> >>> str(“I’m string”) “I’m string” >>> str(100) >>> str(“I’m string”) “I’m string” >>> str(100) ‘100’ >>> >>> str(“I’m string”) “I’m string” >>> str(100) ‘100’ >>> str(complex(10, 3)) >>> str(“I’m string”) “I’m string” >>> str(100) ‘100’ >>> str(complex(10, 3)) ‘(10+3j)’ >>>

Slide 176

Slide 176 text

>>> Operators + concatenate * repeat

Slide 177

Slide 177 text

>>> >>> x = “abc” Operators + concatenate * repeat

Slide 178

Slide 178 text

>>> >>> x = “abc” >>> x = “abc” >>> Operators + concatenate * repeat

Slide 179

Slide 179 text

>>> >>> x = “abc” >>> x = “abc” >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ Operators + concatenate * repeat

Slide 180

Slide 180 text

>>> >>> x = “abc” >>> x = “abc” >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> Operators + concatenate * repeat

Slide 181

Slide 181 text

>>> >>> x = “abc” >>> x = “abc” >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 Operators + concatenate * repeat

Slide 182

Slide 182 text

>>> >>> x = “abc” >>> x = “abc” >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> Operators + concatenate * repeat

Slide 183

Slide 183 text

>>> >>> x = “abc” >>> x = “abc” >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> ‘(’ + x * 3 + ‘)’ Operators + concatenate * repeat

Slide 184

Slide 184 text

>>> >>> x = “abc” >>> x = “abc” >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> ‘(’ + x * 3 + ‘)’ >>> x = ‘abc’ >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> ‘(’ + x * 3 + ‘)’ ‘(abcabcabc)’ >>> Operators + concatenate * repeat

Slide 185

Slide 185 text

>>> >>> x = “abc” >>> x = “abc” >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> ‘(’ + x * 3 + ‘)’ >>> x = ‘abc’ >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> ‘(’ + x * 3 + ‘)’ ‘(abcabcabc)’ >>> >>> x = ‘abc’ >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> ‘(’ + x * 3 + ‘)’ ‘(abcabcabc)’ >>> (x + ‘d’) * 3 Operators + concatenate * repeat

Slide 186

Slide 186 text

>>> >>> x = “abc” >>> x = “abc” >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> >>> x = “abc” >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> ‘(’ + x * 3 + ‘)’ >>> x = ‘abc’ >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> ‘(’ + x * 3 + ‘)’ ‘(abcabcabc)’ >>> >>> x = ‘abc’ >>> ‘(’ + x + ‘)’ ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> ‘(’ + x * 3 + ‘)’ ‘(abcabcabc)’ >>> (x + ‘d’) * 3 ‘(abc)’ >>> x * 3 ‘abcabcabc’ >>> ‘(’ + x * 3 + ‘)’ ‘(abcabcabc)’ >>> (x + ‘d’) * 3 ‘abcdabcdabcd’ >>> Operators + concatenate * repeat

Slide 187

Slide 187 text

>>> Access Character

Slide 188

Slide 188 text

>>> >>> x = ‘0123456789’ Access Character

Slide 189

Slide 189 text

>>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> Access Character

Slide 190

Slide 190 text

>>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> >>> x = ‘0123456789’ >>> x[1] Access Character

Slide 191

Slide 191 text

>>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> >>> x = ‘0123456789’ >>> x[1] >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> Access Character

Slide 192

Slide 192 text

>>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> >>> x = ‘0123456789’ >>> x[1] >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> x[1] = ‘0’ Access Character

Slide 193

Slide 193 text

>>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> >>> x = ‘0123456789’ >>> x[1] >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> x[1] = ‘0’ >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> x[1] = ‘0’ >>> Access Character

Slide 194

Slide 194 text

>>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> >>> x = ‘0123456789’ >>> x[1] >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> x[1] = ‘0’ >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> x[1] = ‘0’ >>> >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> x[1] = ‘0’ >>> x Access Character

Slide 195

Slide 195 text

>>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> >>> x = ‘0123456789’ >>> x[1] >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> x[1] = ‘0’ >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> x[1] = ‘0’ >>> >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> x[1] = ‘0’ >>> x >>> x = ‘0123456789’ >>> x[1] ‘1’ >>> x[1] = ‘0’ >>> x ‘0023456789’ >>> Access Character

Slide 196

Slide 196 text

>>> substring [start:end(:step)]

Slide 197

Slide 197 text

>>> substring [start:end(:step)] [0:length(:1)] default value

Slide 198

Slide 198 text

>>> >>> x = “0123456789” substring [start:end(:step)] [0:length(:1)] default value

Slide 199

Slide 199 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> substring [start:end(:step)] [0:length(:1)] default value

Slide 200

Slide 200 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] substring [start:end(:step)] [0:length(:1)] default value

Slide 201

Slide 201 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> substring [start:end(:step)] [0:length(:1)] default value

Slide 202

Slide 202 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] substring [start:end(:step)] [0:length(:1)] default value

Slide 203

Slide 203 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> substring [start:end(:step)] [0:length(:1)] default value

Slide 204

Slide 204 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] substring [start:end(:step)] [0:length(:1)] default value

Slide 205

Slide 205 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> substring [start:end(:step)] [0:length(:1)] default value

Slide 206

Slide 206 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] substring [start:end(:step)] [0:length(:1)] default value

Slide 207

Slide 207 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> substring [start:end(:step)] [0:length(:1)] default value

Slide 208

Slide 208 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> x[::2] substring [start:end(:step)] [0:length(:1)] default value

Slide 209

Slide 209 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> x[::2] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> x[::2] ‘02468’ >>> substring [start:end(:step)] [0:length(:1)] default value

Slide 210

Slide 210 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> x[::2] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> x[::2] ‘02468’ >>> ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> x[::2] ‘02468’ >>> x[::-1] substring [start:end(:step)] [0:length(:1)] default value

Slide 211

Slide 211 text

>>> >>> x = “0123456789” >>> x = “0123456789” >>> >>> x = “0123456789” >>> x[::] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> >>> x = “0123456789” >>> x[::] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> ‘0123456789’ >>> x[:] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> x[::2] ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> x[::2] ‘02468’ >>> ‘0123456789’ >>> x[1:4] ‘123’ >>> x[1:-1] ‘12345678’ >>> x[::2] ‘02468’ >>> x[::-1] ‘123’ >>> x[1:-1] ‘12345678’ >>> x[::2] ‘02468’ >>> x[::-1] ‘9876543210’ >>> substring [start:end(:step)] [0:length(:1)] default value

Slide 212

Slide 212 text

length of string len(string) >>>

Slide 213

Slide 213 text

length of string len(string) >>> >>> x = ‘0123456789’

Slide 214

Slide 214 text

length of string len(string) >>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>>

Slide 215

Slide 215 text

length of string len(string) >>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> >>> x = ‘0123456789’ >>> len(x)

Slide 216

Slide 216 text

length of string len(string) >>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> >>> x = ‘0123456789’ >>> len(x) >>> x = ‘0123456789’ >>> len(x) 10 >>>

Slide 217

Slide 217 text

length of string len(string) >>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> >>> x = ‘0123456789’ >>> len(x) >>> x = ‘0123456789’ >>> len(x) 10 >>> >>> x = ‘0123456789’ >>> len(x) 10 >>> len(x[::2])

Slide 218

Slide 218 text

length of string len(string) >>> >>> x = ‘0123456789’ >>> x = ‘0123456789’ >>> >>> x = ‘0123456789’ >>> len(x) >>> x = ‘0123456789’ >>> len(x) 10 >>> >>> x = ‘0123456789’ >>> len(x) 10 >>> len(x[::2]) >>> x = ‘0123456789’ >>> len(x) 10 >>> len(x[::2]) 5 >>>

Slide 219

Slide 219 text

List Contents are surrounded by square brackets and separate by comma. >>>

Slide 220

Slide 220 text

List Contents are surrounded by square brackets and separate by comma. >>> >>> [“aaa”, “bbb”, 1, 2]

Slide 221

Slide 221 text

List Contents are surrounded by square brackets and separate by comma. >>> >>> [“aaa”, “bbb”, 1, 2] >>> [“aaa”, “bbb”, 1, 2] [‘aaa’, ‘bbb’, 1, 2] >>>

Slide 222

Slide 222 text

Initialization / Conversion >>>

Slide 223

Slide 223 text

Initialization / Conversion >>> >>> list([1, 2, 3])

Slide 224

Slide 224 text

Initialization / Conversion >>> >>> list([1, 2, 3]) >>> list([1, 2, 3]) [1, 2, 3] >>>

Slide 225

Slide 225 text

Initialization / Conversion >>> >>> list([1, 2, 3]) >>> list([1, 2, 3]) [1, 2, 3] >>> >>> list([1, 2, 3]) [1, 2, 3] >>> list(“abc”)

Slide 226

Slide 226 text

Initialization / Conversion >>> >>> list([1, 2, 3]) >>> list([1, 2, 3]) [1, 2, 3] >>> >>> list([1, 2, 3]) [1, 2, 3] >>> list(“abc”) >>> list([1, 2, 3]) [1, 2, 3] >>> list(“abc”) [‘a’, ‘b’, ‘c’] >>>

Slide 227

Slide 227 text

Operators + append * repeat >>>

Slide 228

Slide 228 text

Operators + append * repeat >>> >>> x = [1, 2, 3]

Slide 229

Slide 229 text

Operators + append * repeat >>> >>> x = [1, 2, 3] >>> x = [1, 2, 3] >>>

Slide 230

Slide 230 text

Operators + append * repeat >>> >>> x = [1, 2, 3] >>> x = [1, 2, 3] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’]

Slide 231

Slide 231 text

Operators + append * repeat >>> >>> x = [1, 2, 3] >>> x = [1, 2, 3] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>>

Slide 232

Slide 232 text

Operators + append * repeat >>> >>> x = [1, 2, 3] >>> x = [1, 2, 3] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x * 2

Slide 233

Slide 233 text

Operators + append * repeat >>> >>> x = [1, 2, 3] >>> x = [1, 2, 3] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x * 2 >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x * 2 [1, 2, 3, 1, 2, 3] >>>

Slide 234

Slide 234 text

Operators + append * repeat >>> >>> x = [1, 2, 3] >>> x = [1, 2, 3] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x * 2 >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x * 2 [1, 2, 3, 1, 2, 3] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x * 2 [1, 2, 3, 1, 2, 3] >>> x + y

Slide 235

Slide 235 text

Operators + append * repeat >>> >>> x = [1, 2, 3] >>> x = [1, 2, 3] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x * 2 >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x * 2 [1, 2, 3, 1, 2, 3] >>> >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x * 2 [1, 2, 3, 1, 2, 3] >>> x + y >>> x = [1, 2, 3] >>> y = [‘a’, ‘b’] >>> x * 2 [1, 2, 3, 1, 2, 3] >>> x + y [1, 2, 3, ‘a’, ‘b’] >>>

Slide 236

Slide 236 text

>>> Access Element

Slide 237

Slide 237 text

>>> >>> x = [1, 2, 3, 4, 5] Access Element

Slide 238

Slide 238 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> Access Element

Slide 239

Slide 239 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] Access Element

Slide 240

Slide 240 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> Access Element

Slide 241

Slide 241 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> x[1] = ‘0’ Access Element

Slide 242

Slide 242 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> x[1] = ‘0’ >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> x[1] = ‘0’ >>> Access Element

Slide 243

Slide 243 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> x[1] = ‘0’ >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> x[1] = ‘0’ >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> x[1] = ‘0’ >>> x Access Element

Slide 244

Slide 244 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> x[1] = ‘0’ >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> x[1] = ‘0’ >>> >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> x[1] = ‘0’ >>> x >>> x = [1, 2, 3, 4, 5] >>> x[1] 2 >>> x[1] = ‘0’ >>> x [1, ‘0’, 3, 4, 5] >>> Access Element

Slide 245

Slide 245 text

>>> Slice [start:end(:step)]

Slide 246

Slide 246 text

>>> Slice [start:end(:step)] [0:length(:1)] default value

Slide 247

Slide 247 text

>>> >>> x = [1, 2, 3, 4, 5] Slice [start:end(:step)] [0:length(:1)] default value

Slide 248

Slide 248 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> Slice [start:end(:step)] [0:length(:1)] default value

Slide 249

Slide 249 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] Slice [start:end(:step)] [0:length(:1)] default value

Slide 250

Slide 250 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> Slice [start:end(:step)] [0:length(:1)] default value

Slide 251

Slide 251 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] Slice [start:end(:step)] [0:length(:1)] default value

Slide 252

Slide 252 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> Slice [start:end(:step)] [0:length(:1)] default value

Slide 253

Slide 253 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] Slice [start:end(:step)] [0:length(:1)] default value

Slide 254

Slide 254 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> Slice [start:end(:step)] [0:length(:1)] default value

Slide 255

Slide 255 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] Slice [start:end(:step)] [0:length(:1)] default value

Slide 256

Slide 256 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> Slice [start:end(:step)] [0:length(:1)] default value

Slide 257

Slide 257 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> x[::2] Slice [start:end(:step)] [0:length(:1)] default value

Slide 258

Slide 258 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> x[::2] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> x[::2] [1, 3, 5] >>> Slice [start:end(:step)] [0:length(:1)] default value

Slide 259

Slide 259 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> x[::2] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> x[::2] [1, 3, 5] >>> [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> x[::2] [1, 3, 5] >>> x[::-1] Slice [start:end(:step)] [0:length(:1)] default value

Slide 260

Slide 260 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> >>> x = [1, 2, 3, 4, 5] >>> x[::] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> [1, 2, 3, 4, 5] >>> x[:] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> x[::2] [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> x[::2] [1, 3, 5] >>> [1, 2, 3, 4, 5] >>> x[1:3] [2, 3] >>> x[1:-1] [2, 3, 4] >>> x[::2] [1, 3, 5] >>> x[::-1] [2, 3] >>> x[1:-1] [2, 3, 4] >>> x[::2] [1, 3, 5] >>> x[::-1] [5, 4, 3, 2, 1] >>> Slice [start:end(:step)] [0:length(:1)] default value

Slide 261

Slide 261 text

>>> length of list len(list)

Slide 262

Slide 262 text

>>> >>> x = [1, 2, 3, 4, 5] length of list len(list)

Slide 263

Slide 263 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> length of list len(list)

Slide 264

Slide 264 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> len(x) length of list len(list)

Slide 265

Slide 265 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> len(x) >>> x = [1, 2, 3, 4, 5] >>> len(x) 5 >>> length of list len(list)

Slide 266

Slide 266 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> len(x) >>> x = [1, 2, 3, 4, 5] >>> len(x) 5 >>> >>> x = [1, 2, 3, 4, 5] >>> len(x) 5 >>> len(x[::2]) length of list len(list)

Slide 267

Slide 267 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> len(x) >>> x = [1, 2, 3, 4, 5] >>> len(x) 5 >>> >>> x = [1, 2, 3, 4, 5] >>> len(x) 5 >>> len(x[::2]) >>> x = [1, 2, 3, 4, 5] >>> len(x) 5 >>> len(x[::2]) 3 >>> length of list len(list)

Slide 268

Slide 268 text

Tuple Immutable List >>>

Slide 269

Slide 269 text

Tuple Immutable List >>> >>> (1, ‘aaa’, 2)

Slide 270

Slide 270 text

Tuple Immutable List >>> >>> (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>>

Slide 271

Slide 271 text

Tuple Immutable List >>> >>> (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2

Slide 272

Slide 272 text

Tuple Immutable List >>> >>> (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>>

Slide 273

Slide 273 text

Tuple Immutable List >>> >>> (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2)

Slide 274

Slide 274 text

Tuple Immutable List >>> >>> (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>>

Slide 275

Slide 275 text

Tuple Immutable List >>> >>> (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>> x[1] = 3

Slide 276

Slide 276 text

Tuple Immutable List >>> >>> (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>> x[1] = 3 >>> x[1] = 3 Traceback (most recent call last): File "", line 1, in TypeError: 'tuple' object does not support item assignment

Slide 277

Slide 277 text

Tuple Immutable List >>> >>> (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>> >>> (1, ‘aaa’, 2) (1, ‘aaa’, 2) >>> 1, ‘aaa’, 2 (1, ‘aaa’, 2) >>> x = (1, ‘aaa’, 2) >>> x[1] = 3 >>> x[1] = 3 Traceback (most recent call last): File "", line 1, in TypeError: 'tuple' object does not support item assignment Traceback (most recent call last): File "", line 1, in TypeError: 'tuple' object does not support item assignment >>>

Slide 278

Slide 278 text

>>> Initialization / Conversion

Slide 279

Slide 279 text

>>> >>> tuple([1, 2, 3]) Initialization / Conversion

Slide 280

Slide 280 text

>>> >>> tuple([1, 2, 3]) >>> tuple([1, 2, 3]) (1, 2, 3) >>> Initialization / Conversion

Slide 281

Slide 281 text

>>> Access Element

Slide 282

Slide 282 text

>>> >>> x = (1, 2, 3) Access Element

Slide 283

Slide 283 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>>

Slide 284

Slide 284 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>> >>> x = (1, 2, 3) >>> x[1]

Slide 285

Slide 285 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>> >>> x = (1, 2, 3) >>> x[1] >>> x = (1, 2, 3) >>> x[1] 2 >>>

Slide 286

Slide 286 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>> >>> x = (1, 2, 3) >>> x[1] >>> x = (1, 2, 3) >>> x[1] 2 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x

Slide 287

Slide 287 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>> >>> x = (1, 2, 3) >>> x[1] >>> x = (1, 2, 3) >>> x[1] 2 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>>

Slide 288

Slide 288 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>> >>> x = (1, 2, 3) >>> x[1] >>> x = (1, 2, 3) >>> x[1] 2 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a

Slide 289

Slide 289 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>> >>> x = (1, 2, 3) >>> x[1] >>> x = (1, 2, 3) >>> x[1] 2 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a 1 >>>

Slide 290

Slide 290 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>> >>> x = (1, 2, 3) >>> x[1] >>> x = (1, 2, 3) >>> x[1] 2 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> b

Slide 291

Slide 291 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>> >>> x = (1, 2, 3) >>> x[1] >>> x = (1, 2, 3) >>> x[1] 2 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> b >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> b 2 >>>

Slide 292

Slide 292 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>> >>> x = (1, 2, 3) >>> x[1] >>> x = (1, 2, 3) >>> x[1] 2 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> b >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> b 2 >>> >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> b 2 >>> c

Slide 293

Slide 293 text

>>> >>> x = (1, 2, 3) Access Element >>> x = (1, 2, 3) >>> >>> x = (1, 2, 3) >>> x[1] >>> x = (1, 2, 3) >>> x[1] 2 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> >>> x = (1, 2, 3) >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> b >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> b 2 >>> >>> x[1] 2 >>> a, b, c = x >>> a 1 >>> b 2 >>> c >>> a, b, c = x >>> a 1 >>> b 2 >>> c 3 >>>

Slide 294

Slide 294 text

>>> length of tuple len(tuple)

Slide 295

Slide 295 text

>>> >>> x = 1, 2, 3, 4, 5 length of tuple len(tuple)

Slide 296

Slide 296 text

>>> >>> x = 1, 2, 3, 4, 5 >>> x = 1, 2, 3, 4, 5 >>> length of tuple len(tuple)

Slide 297

Slide 297 text

>>> >>> x = 1, 2, 3, 4, 5 >>> x = 1, 2, 3, 4, 5 >>> >>> x = 1, 2, 3, 4, 5 >>> len(x) length of tuple len(tuple)

Slide 298

Slide 298 text

>>> >>> x = 1, 2, 3, 4, 5 >>> x = 1, 2, 3, 4, 5 >>> >>> x = 1, 2, 3, 4, 5 >>> len(x) >>> x = 1, 2, 3, 4, 5 >>> len(x) 5 >>> length of tuple len(tuple)

Slide 299

Slide 299 text

Dictionary >>> key-value relation key value

Slide 300

Slide 300 text

Dictionary >>> key-value relation key value

Slide 301

Slide 301 text

Dictionary >>> key-value relation key value >>> x = dict()

Slide 302

Slide 302 text

Dictionary >>> key-value relation key value >>> x = dict() >>> x = dict() >>>

Slide 303

Slide 303 text

Dictionary >>> key-value relation key value >>> x = dict() >>> x = dict() >>> >>> x = dict() >>> x[‘abc’] = 123

Slide 304

Slide 304 text

Dictionary >>> key-value relation key value >>> x = dict() >>> x = dict() >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x = dict() >>> x[‘abc’] = 123 >>>

Slide 305

Slide 305 text

Dictionary >>> key-value relation key value >>> x = dict() >>> x = dict() >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x = dict() >>> x[‘abc’] = 123 >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’

Slide 306

Slide 306 text

Dictionary >>> key-value relation key value >>> x = dict() >>> x = dict() >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x = dict() >>> x[‘abc’] = 123 >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>>

Slide 307

Slide 307 text

Dictionary >>> key-value relation key value >>> x = dict() >>> x = dict() >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x = dict() >>> x[‘abc’] = 123 >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x

Slide 308

Slide 308 text

Dictionary >>> key-value relation key value >>> x = dict() >>> x = dict() >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x = dict() >>> x[‘abc’] = 123 >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x {‘abc’: 123, 111: ‘aaa’} >>>

Slide 309

Slide 309 text

Dictionary >>> key-value relation key value >>> x = dict() >>> x = dict() >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x = dict() >>> x[‘abc’] = 123 >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x {‘abc’: 123, 111: ‘aaa’} >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x {‘abc’: 123, 111: ‘aaa’} >>> {1: 20, 2: 30}

Slide 310

Slide 310 text

Dictionary >>> key-value relation key value >>> x = dict() >>> x = dict() >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x = dict() >>> x[‘abc’] = 123 >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x {‘abc’: 123, 111: ‘aaa’} >>> >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x {‘abc’: 123, 111: ‘aaa’} >>> {1: 20, 2: 30} >>> x = dict() >>> x[‘abc’] = 123 >>> x[111] = ‘aaa’ >>> x {‘abc’: 123, 111: ‘aaa’} >>> {1: 20, 2: 30} {1: 20, 2: 30} >>>

Slide 311

Slide 311 text

Initialization / Conversion >>>

Slide 312

Slide 312 text

Initialization / Conversion >>> >>> dict()

Slide 313

Slide 313 text

Initialization / Conversion >>> >>> dict() >>> dict() {} >>>

Slide 314

Slide 314 text

Initialization / Conversion >>> >>> dict() >>> dict() {} >>> >>> dict() {} >>> dict(one=1, two=2)

Slide 315

Slide 315 text

Initialization / Conversion >>> >>> dict() >>> dict() {} >>> >>> dict() {} >>> dict(one=1, two=2) >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>>

Slide 316

Slide 316 text

Initialization / Conversion >>> >>> dict() >>> dict() {} >>> >>> dict() {} >>> dict(one=1, two=2) >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)])

Slide 317

Slide 317 text

Initialization / Conversion >>> >>> dict() >>> dict() {} >>> >>> dict() {} >>> dict(one=1, two=2) >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) {‘one’: 1, ‘two’: 2} >>>

Slide 318

Slide 318 text

Initialization / Conversion >>> >>> dict() >>> dict() {} >>> >>> dict() {} >>> dict(one=1, two=2) >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) {‘one’: 1, ‘two’: 2} >>> >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) {‘one’: 1, ‘two’: 2} >>> dict({‘one’: 1, {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) {‘one’: 1, ‘two’: 2} >>> dict({‘one’: 1, {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) {‘one’: 1, ‘two’: 2} >>> dict({‘one’: 1, ‘two’: 2})

Slide 319

Slide 319 text

Initialization / Conversion >>> >>> dict() >>> dict() {} >>> >>> dict() {} >>> dict(one=1, two=2) >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) {‘one’: 1, ‘two’: 2} >>> >>> dict() {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) {‘one’: 1, ‘two’: 2} >>> dict({‘one’: 1, {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) {‘one’: 1, ‘two’: 2} >>> dict({‘one’: 1, {} >>> dict(one=1, two=2) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) {‘one’: 1, ‘two’: 2} >>> dict({‘one’: 1, ‘two’: 2}) {‘one’: 1, ‘two’: 2} >>> dict([('two', 2), (‘one’: 1)]) {‘one’: 1, ‘two’: 2} >>> dict({‘one’: 1, ‘two’: 2}) {‘one’: 1, ‘two’: 2} >>>

Slide 320

Slide 320 text

>>> number of dictionary len(dict)

Slide 321

Slide 321 text

>>> >>> x = {‘one’: 1, number of dictionary len(dict) >>> x = {‘one’: 1, ‘two’: 2}

Slide 322

Slide 322 text

>>> >>> x = {‘one’: 1, number of dictionary len(dict) >>> x = {‘one’: 1, ‘two’: 2} >>> x = {‘one’: 1, ‘two’: 2} >>>

Slide 323

Slide 323 text

>>> >>> x = {‘one’: 1, number of dictionary len(dict) >>> x = {‘one’: 1, ‘two’: 2} >>> x = {‘one’: 1, ‘two’: 2} >>> >>> x = {‘one’: 1, ‘two’: 2} >>> len(x)

Slide 324

Slide 324 text

>>> >>> x = {‘one’: 1, number of dictionary len(dict) >>> x = {‘one’: 1, ‘two’: 2} >>> x = {‘one’: 1, ‘two’: 2} >>> >>> x = {‘one’: 1, ‘two’: 2} >>> len(x) >>> x = {‘one’: 1, ‘two’: 2} >>> len(x) 2 >>>

Slide 325

Slide 325 text

Control

Slide 326

Slide 326 text

Condition >>>

Slide 327

Slide 327 text

Condition >>> >>> x = 100

Slide 328

Slide 328 text

Condition >>> >>> x = 100 >>> x = 100 >>>

Slide 329

Slide 329 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100:

Slide 330

Slide 330 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ...

Slide 331

Slide 331 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10

Slide 332

Slide 332 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ...

Slide 333

Slide 333 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100:

Slide 334

Slide 334 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ...

Slide 335

Slide 335 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10

Slide 336

Slide 336 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ...

Slide 337

Slide 337 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else:

Slide 338

Slide 338 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ...

Slide 339

Slide 339 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0

Slide 340

Slide 340 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ...

Slide 341

Slide 341 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>>

Slide 342

Slide 342 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x

Slide 343

Slide 343 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x 0 >>>

Slide 344

Slide 344 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x 0 >>> >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x 0 >>>

Slide 345

Slide 345 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x 0 >>> >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x 0 >>> else if

Slide 346

Slide 346 text

Condition >>> >>> x = 100 >>> x = 100 >>> >>> x = 100 >>> if x > 100: >>> x = 100 >>> if x > 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x 0 >>> >>> x = 100 >>> if x > 100: ... x = x + 10 ... elif x < 100: ... x = x - 10 ... else: ... x = 0 ... >>> x 0 >>> else if no switch statement in Python

Slide 347

Slide 347 text

>>> Loop

Slide 348

Slide 348 text

>>> >>> i = 0 Loop

Slide 349

Slide 349 text

>>> >>> i = 0 >>> i = 0 >>> Loop

Slide 350

Slide 350 text

>>> >>> i = 0 >>> i = 0 >>> >>> i = 0 >>> while i < 3: Loop

Slide 351

Slide 351 text

>>> >>> i = 0 >>> i = 0 >>> >>> i = 0 >>> while i < 3: >>> i = 0 >>> while i < 3: ... Loop

Slide 352

Slide 352 text

>>> >>> i = 0 >>> i = 0 >>> >>> i = 0 >>> while i < 3: >>> i = 0 >>> while i < 3: ... >>> i = 0 >>> while i < 3: ... i = i + 1 Loop

Slide 353

Slide 353 text

>>> >>> i = 0 >>> i = 0 >>> >>> i = 0 >>> while i < 3: >>> i = 0 >>> while i < 3: ... >>> i = 0 >>> while i < 3: ... i = i + 1 >>> i = 0 >>> while i < 3: ... i = i + 1 ... Loop

Slide 354

Slide 354 text

>>> >>> i = 0 >>> i = 0 >>> >>> i = 0 >>> while i < 3: >>> i = 0 >>> while i < 3: ... >>> i = 0 >>> while i < 3: ... i = i + 1 >>> i = 0 >>> while i < 3: ... i = i + 1 ... >>> i = 0 >>> while i < 3: ... i = i + 1 ... print i Loop

Slide 355

Slide 355 text

>>> >>> i = 0 >>> i = 0 >>> >>> i = 0 >>> while i < 3: >>> i = 0 >>> while i < 3: ... >>> i = 0 >>> while i < 3: ... i = i + 1 >>> i = 0 >>> while i < 3: ... i = i + 1 ... >>> i = 0 >>> while i < 3: ... i = i + 1 ... print i >>> i = 0 >>> while i < 3: ... i = i + 1 ... print i ... Loop

Slide 356

Slide 356 text

>>> >>> i = 0 >>> i = 0 >>> >>> i = 0 >>> while i < 3: >>> i = 0 >>> while i < 3: ... >>> i = 0 >>> while i < 3: ... i = i + 1 >>> i = 0 >>> while i < 3: ... i = i + 1 ... >>> i = 0 >>> while i < 3: ... i = i + 1 ... print i >>> i = 0 >>> while i < 3: ... i = i + 1 ... print i ... >>> i = 0 >>> while i < 3: ... i = i + 1 ... print i ... 1 2 3 >>> Loop

Slide 357

Slide 357 text

>>> >>> i = 0 >>> i = 0 >>> >>> i = 0 >>> while i < 3: >>> i = 0 >>> while i < 3: ... >>> i = 0 >>> while i < 3: ... i = i + 1 >>> i = 0 >>> while i < 3: ... i = i + 1 ... >>> i = 0 >>> while i < 3: ... i = i + 1 ... print i >>> i = 0 >>> while i < 3: ... i = i + 1 ... print i ... >>> i = 0 >>> while i < 3: ... i = i + 1 ... print i ... 1 2 3 >>> no do-while statement in Python Loop

Slide 358

Slide 358 text

>>> Traversal Sequence

Slide 359

Slide 359 text

>>> >>> x = [1, 2, 3, 4, 5] Traversal Sequence

Slide 360

Slide 360 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> Traversal Sequence

Slide 361

Slide 361 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> for i in x: Traversal Sequence

Slide 362

Slide 362 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> for i in x: >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... Traversal Sequence

Slide 363

Slide 363 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> for i in x: >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i Traversal Sequence

Slide 364

Slide 364 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> for i in x: >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i ... Traversal Sequence

Slide 365

Slide 365 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> for i in x: >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i ... >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i ... 1 2 3 4 5 >>> Traversal Sequence

Slide 366

Slide 366 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> for i in x: >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i ... >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i ... 1 2 3 4 5 >>> Traversal Sequence >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i ... 1 2 3 4 5 >>>

Slide 367

Slide 367 text

>>> >>> x = [1, 2, 3, 4, 5] >>> x = [1, 2, 3, 4, 5] >>> >>> x = [1, 2, 3, 4, 5] >>> for i in x: >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i ... >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i ... 1 2 3 4 5 >>> Traversal Sequence >>> x = [1, 2, 3, 4, 5] >>> for i in x: ... print i ... 1 2 3 4 5 >>> must be a iterable object

Slide 368

Slide 368 text

>>> Addition for Loop continue skip remaining statement and continue loop

Slide 369

Slide 369 text

>>> >>> for i in range(5): Addition for Loop continue skip remaining statement and continue loop

Slide 370

Slide 370 text

>>> >>> for i in range(5): >>> for i in range(5): ... Addition for Loop continue skip remaining statement and continue loop

Slide 371

Slide 371 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: Addition for Loop continue skip remaining statement and continue loop

Slide 372

Slide 372 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... Addition for Loop continue skip remaining statement and continue loop

Slide 373

Slide 373 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... >>> for i in range(5): ... if i == 2: ... continue Addition for Loop continue skip remaining statement and continue loop

Slide 374

Slide 374 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... >>> for i in range(5): ... if i == 2: ... continue >>> for i in range(5): ... if i == 2: ... continue ... Addition for Loop continue skip remaining statement and continue loop

Slide 375

Slide 375 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... >>> for i in range(5): ... if i == 2: ... continue >>> for i in range(5): ... if i == 2: ... continue ... >>> for i in range(5): ... if i == 2: ... continue ... print i Addition for Loop continue skip remaining statement and continue loop

Slide 376

Slide 376 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... >>> for i in range(5): ... if i == 2: ... continue >>> for i in range(5): ... if i == 2: ... continue ... >>> for i in range(5): ... if i == 2: ... continue ... print i >>> for i in range(5): ... if i == 2: ... continue ... print i ... Addition for Loop continue skip remaining statement and continue loop

Slide 377

Slide 377 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... >>> for i in range(5): ... if i == 2: ... continue >>> for i in range(5): ... if i == 2: ... continue ... >>> for i in range(5): ... if i == 2: ... continue ... print i >>> for i in range(5): ... if i == 2: ... continue ... print i ... ... if i == 2: ... continue ... print i ... 0 1 3 4 >>> Addition for Loop continue skip remaining statement and continue loop

Slide 378

Slide 378 text

>>> Addition for Loop break exit from loop

Slide 379

Slide 379 text

>>> >>> for i in range(5): Addition for Loop break exit from loop

Slide 380

Slide 380 text

>>> >>> for i in range(5): >>> for i in range(5): ... Addition for Loop break exit from loop

Slide 381

Slide 381 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: Addition for Loop break exit from loop

Slide 382

Slide 382 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... Addition for Loop break exit from loop

Slide 383

Slide 383 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... >>> for i in range(5): ... if i == 2: ... break Addition for Loop break exit from loop

Slide 384

Slide 384 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... >>> for i in range(5): ... if i == 2: ... break >>> for i in range(5): ... if i == 2: ... break ... Addition for Loop break exit from loop

Slide 385

Slide 385 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... >>> for i in range(5): ... if i == 2: ... break >>> for i in range(5): ... if i == 2: ... break ... >>> for i in range(5): ... if i == 2: ... break ... print i Addition for Loop break exit from loop

Slide 386

Slide 386 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... >>> for i in range(5): ... if i == 2: ... break >>> for i in range(5): ... if i == 2: ... break ... >>> for i in range(5): ... if i == 2: ... break ... print i >>> for i in range(5): ... if i == 2: ... break ... print i ... Addition for Loop break exit from loop

Slide 387

Slide 387 text

>>> >>> for i in range(5): >>> for i in range(5): ... >>> for i in range(5): ... if i == 2: >>> for i in range(5): ... if i == 2: ... >>> for i in range(5): ... if i == 2: ... break >>> for i in range(5): ... if i == 2: ... break ... >>> for i in range(5): ... if i == 2: ... break ... print i >>> for i in range(5): ... if i == 2: ... break ... print i ... >>> for i in range(5): ... if i == 2: ... break ... print i ... 0 1 >>> Addition for Loop break exit from loop

Slide 388

Slide 388 text

>>> Addition for Loop else do something after unbroken loop

Slide 389

Slide 389 text

>>> >>> for i in range(3): Addition for Loop else do something after unbroken loop

Slide 390

Slide 390 text

>>> >>> for i in range(3): >>> for i in range(3): ... Addition for Loop else do something after unbroken loop

Slide 391

Slide 391 text

>>> >>> for i in range(3): >>> for i in range(3): ... >>> for i in range(3): ... print i Addition for Loop else do something after unbroken loop

Slide 392

Slide 392 text

>>> >>> for i in range(3): >>> for i in range(3): ... >>> for i in range(3): ... print i >>> for i in range(3): ... print i ... Addition for Loop else do something after unbroken loop

Slide 393

Slide 393 text

>>> >>> for i in range(3): >>> for i in range(3): ... >>> for i in range(3): ... print i >>> for i in range(3): ... print i ... >>> for i in range(3): ... print i ... else: Addition for Loop else do something after unbroken loop

Slide 394

Slide 394 text

>>> >>> for i in range(3): >>> for i in range(3): ... >>> for i in range(3): ... print i >>> for i in range(3): ... print i ... >>> for i in range(3): ... print i ... else: >>> for i in range(3): ... print i ... else: ... Addition for Loop else do something after unbroken loop

Slide 395

Slide 395 text

>>> >>> for i in range(3): >>> for i in range(3): ... >>> for i in range(3): ... print i >>> for i in range(3): ... print i ... >>> for i in range(3): ... print i ... else: >>> for i in range(3): ... print i ... else: ... >>> for i in range(3): ... print i ... else: ... print “done” Addition for Loop else do something after unbroken loop

Slide 396

Slide 396 text

>>> >>> for i in range(3): >>> for i in range(3): ... >>> for i in range(3): ... print i >>> for i in range(3): ... print i ... >>> for i in range(3): ... print i ... else: >>> for i in range(3): ... print i ... else: ... >>> for i in range(3): ... print i ... else: ... print “done” >>> for i in range(3): ... print i ... else: ... print “done” ... Addition for Loop else do something after unbroken loop

Slide 397

Slide 397 text

>>> >>> for i in range(3): >>> for i in range(3): ... >>> for i in range(3): ... print i >>> for i in range(3): ... print i ... >>> for i in range(3): ... print i ... else: >>> for i in range(3): ... print i ... else: ... >>> for i in range(3): ... print i ... else: ... print “done” >>> for i in range(3): ... print i ... else: ... print “done” ... ... print i ... else: ... print “done” ... 0 1 2 done >>> Addition for Loop else do something after unbroken loop

Slide 398

Slide 398 text

Standard I/O

Slide 399

Slide 399 text

Evaluated Input input read a string can be evaluated return an evaluated object >>>

Slide 400

Slide 400 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input()

Slide 401

Slide 401 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1

Slide 402

Slide 402 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>>

Slide 403

Slide 403 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input()

Slide 404

Slide 404 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2

Slide 405

Slide 405 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>>

Slide 406

Slide 406 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input()

Slide 407

Slide 407 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2

Slide 408

Slide 408 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>>

Slide 409

Slide 409 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input()

Slide 410

Slide 410 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb”

Slide 411

Slide 411 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>>

Slide 412

Slide 412 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input()

Slide 413

Slide 413 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3]

Slide 414

Slide 414 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>>

Slide 415

Slide 415 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>> 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>> input()

Slide 416

Slide 416 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>> 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>> input() 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>> input() 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>> input() 1 2

Slide 417

Slide 417 text

Evaluated Input input read a string can be evaluated return an evaluated object >>> >>> input() >>> input() 1 >>> input() 1 1 >>> >>> input() 1 1 >>> input() >>> input() 1 1 >>> input() 1 + 2 >>> input() 1 1 >>> input() 1 + 2 3 >>> >>> input() 1 1 >>> input() 1 + 2 3 >>> input() >>> input() 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> 1 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() 1 >>> input() 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> 1 + 2 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() 3 >>> input() 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>> 5.0 / 2 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>> input() 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>> input() 2.5 >>> input() “aaa bbb” ‘aaa bbb’ >>> input() [1, 2, 3] [1, 2, 3] >>> input() 1 2 >>> input() 1 2 Traceback (most recent call last): File "", line 1, in File "", line 1 1 2 ^ SyntaxError: unexpected EOF while parsing >>>

Slide 418

Slide 418 text

>>> Raw Input raw_input() read a string return a string

Slide 419

Slide 419 text

>>> >>> raw_input() Raw Input raw_input() read a string return a string

Slide 420

Slide 420 text

>>> >>> raw_input() >>> raw_input() 1 Raw Input raw_input() read a string return a string

Slide 421

Slide 421 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> Raw Input raw_input() read a string return a string

Slide 422

Slide 422 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() Raw Input raw_input() read a string return a string

Slide 423

Slide 423 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 Raw Input raw_input() read a string return a string

Slide 424

Slide 424 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> Raw Input raw_input() read a string return a string

Slide 425

Slide 425 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() Raw Input raw_input() read a string return a string

Slide 426

Slide 426 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 Raw Input raw_input() read a string return a string

Slide 427

Slide 427 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> Raw Input raw_input() read a string return a string

Slide 428

Slide 428 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() Raw Input raw_input() read a string return a string

Slide 429

Slide 429 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” Raw Input raw_input() read a string return a string

Slide 430

Slide 430 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> Raw Input raw_input() read a string return a string

Slide 431

Slide 431 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() Raw Input raw_input() read a string return a string

Slide 432

Slide 432 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] Raw Input raw_input() read a string return a string

Slide 433

Slide 433 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> Raw Input raw_input() read a string return a string

Slide 434

Slide 434 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> raw_input() Raw Input raw_input() read a string return a string

Slide 435

Slide 435 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> raw_input() ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> raw_input() ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> raw_input() 1 2 Raw Input raw_input() read a string return a string

Slide 436

Slide 436 text

>>> >>> raw_input() >>> raw_input() 1 >>> raw_input() 1 ‘1’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() >>> raw_input() 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> 1 ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() ‘1’ >>> raw_input() 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> 1 + 2 ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() ‘1 + 2’ >>> raw_input() 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> 5.0 / 2 ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> raw_input() ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> raw_input() ‘5.0 / 2’ >>> raw_input() “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> raw_input() 1 2 “aaa bbb” ‘“aaa bbb”’ >>> raw_input() [1, 2, 3] ‘[1, 2, 3]’ >>> raw_input() 1 2 ‘1 2’ >>> Raw Input raw_input() read a string return a string

Slide 437

Slide 437 text

Output print print object to standard output >>>

Slide 438

Slide 438 text

Output print print object to standard output >>> >>> print “Hello World!”

Slide 439

Slide 439 text

Output print print object to standard output >>> >>> print “Hello World!” >>> print “Hello World!” Hello World! >>>

Slide 440

Slide 440 text

Output print print object to standard output >>> >>> print “Hello World!” >>> print “Hello World!” Hello World! >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!”

Slide 441

Slide 441 text

Output print print object to standard output >>> >>> print “Hello World!” >>> print “Hello World!” Hello World! >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>>

Slide 442

Slide 442 text

Output print print object to standard output >>> >>> print “Hello World!” >>> print “Hello World!” Hello World! >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> print 1 + 2

Slide 443

Slide 443 text

Output print print object to standard output >>> >>> print “Hello World!” >>> print “Hello World!” Hello World! >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> print 1 + 2 >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> print 1 + 2 3 >>>

Slide 444

Slide 444 text

Output print print object to standard output >>> >>> print “Hello World!” >>> print “Hello World!” Hello World! >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> print 1 + 2 >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> print 1 + 2 3 >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> print 1 + 2 3 >>> print [1, 2, 3]

Slide 445

Slide 445 text

Output print print object to standard output >>> >>> print “Hello World!” >>> print “Hello World!” Hello World! >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> print 1 + 2 >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> print 1 + 2 3 >>> >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> print 1 + 2 3 >>> print [1, 2, 3] >>> print “Hello World!” Hello World! >>> print “Hello”, “World!” Hello World! >>> print 1 + 2 3 >>> print [1, 2, 3] [1, 2, 3] >>>

Slide 446

Slide 446 text

Custom Function

Slide 447

Slide 447 text

>>> Define a Function

Slide 448

Slide 448 text

>>> >>> def SQ(x): Define a Function

Slide 449

Slide 449 text

>>> >>> def SQ(x): >>> def SQ(x): ... Define a Function

Slide 450

Slide 450 text

>>> >>> def SQ(x): >>> def SQ(x): ... >>> def SQ(x): ... return x * x Define a Function

Slide 451

Slide 451 text

>>> >>> def SQ(x): >>> def SQ(x): ... >>> def SQ(x): ... return x * x >>> def SQ(x): ... return x * x ... Define a Function

Slide 452

Slide 452 text

>>> >>> def SQ(x): >>> def SQ(x): ... >>> def SQ(x): ... return x * x >>> def SQ(x): ... return x * x ... >>> def SQ(x): ... return x * x ... >>> Define a Function

Slide 453

Slide 453 text

>>> >>> def SQ(x): >>> def SQ(x): ... >>> def SQ(x): ... return x * x >>> def SQ(x): ... return x * x ... >>> def SQ(x): ... return x * x ... >>> >>> def SQ(x): ... return x * x ... >>> SQ(10) Define a Function

Slide 454

Slide 454 text

>>> >>> def SQ(x): >>> def SQ(x): ... >>> def SQ(x): ... return x * x >>> def SQ(x): ... return x * x ... >>> def SQ(x): ... return x * x ... >>> >>> def SQ(x): ... return x * x ... >>> SQ(10) >>> def SQ(x): ... return x * x ... >>> SQ(10) 100 >>> Define a Function

Slide 455

Slide 455 text

>>> >>> def SQ(x): >>> def SQ(x): ... >>> def SQ(x): ... return x * x >>> def SQ(x): ... return x * x ... >>> def SQ(x): ... return x * x ... >>> >>> def SQ(x): ... return x * x ... >>> SQ(10) >>> def SQ(x): ... return x * x ... >>> SQ(10) 100 >>> Define a Function >>> def SQ(x): ... return x * x ... >>> SQ(10) 100 >>>

Slide 456

Slide 456 text

>>> >>> def SQ(x): >>> def SQ(x): ... >>> def SQ(x): ... return x * x >>> def SQ(x): ... return x * x ... >>> def SQ(x): ... return x * x ... >>> >>> def SQ(x): ... return x * x ... >>> SQ(10) >>> def SQ(x): ... return x * x ... >>> SQ(10) 100 >>> Define a Function >>> def SQ(x): ... return x * x ... >>> SQ(10) 100 >>> function name

Slide 457

Slide 457 text

>>> >>> def SQ(x): >>> def SQ(x): ... >>> def SQ(x): ... return x * x >>> def SQ(x): ... return x * x ... >>> def SQ(x): ... return x * x ... >>> >>> def SQ(x): ... return x * x ... >>> SQ(10) >>> def SQ(x): ... return x * x ... >>> SQ(10) 100 >>> Define a Function >>> def SQ(x): ... return x * x ... >>> SQ(10) 100 >>> function name parameter

Slide 458

Slide 458 text

>>> >>> def SQ(x): >>> def SQ(x): ... >>> def SQ(x): ... return x * x >>> def SQ(x): ... return x * x ... >>> def SQ(x): ... return x * x ... >>> >>> def SQ(x): ... return x * x ... >>> SQ(10) >>> def SQ(x): ... return x * x ... >>> SQ(10) 100 >>> Define a Function >>> def SQ(x): ... return x * x ... >>> SQ(10) 100 >>> function name parameter function content

Slide 459

Slide 459 text

Lambda Function >>>

Slide 460

Slide 460 text

Lambda Function >>> >>> CUBE = lambda k: k * k * k

Slide 461

Slide 461 text

Lambda Function >>> >>> CUBE = lambda k: k * k * k >>> CUBE = lambda k: k * k * k >>>

Slide 462

Slide 462 text

Lambda Function >>> >>> CUBE = lambda k: k * k * k >>> CUBE = lambda k: k * k * k >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10)

Slide 463

Slide 463 text

Lambda Function >>> >>> CUBE = lambda k: k * k * k >>> CUBE = lambda k: k * k * k >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>>

Slide 464

Slide 464 text

Lambda Function >>> >>> CUBE = lambda k: k * k * k >>> CUBE = lambda k: k * k * k >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4)

Slide 465

Slide 465 text

Lambda Function >>> >>> CUBE = lambda k: k * k * k >>> CUBE = lambda k: k * k * k >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) 12 >>>

Slide 466

Slide 466 text

Lambda Function >>> >>> CUBE = lambda k: k * k * k >>> CUBE = lambda k: k * k * k >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) 12 >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) 12 >>>

Slide 467

Slide 467 text

Lambda Function >>> >>> CUBE = lambda k: k * k * k >>> CUBE = lambda k: k * k * k >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) 12 >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) 12 >>> parameter

Slide 468

Slide 468 text

Lambda Function >>> >>> CUBE = lambda k: k * k * k >>> CUBE = lambda k: k * k * k >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) 12 >>> >>> CUBE = lambda k: k * k * k >>> CUBE(10) 1000 >>> (lambda x, y: x * y)(3, 4) 12 >>> parameter return value

Slide 469

Slide 469 text

Built-in Function

Slide 470

Slide 470 text

range >>>

Slide 471

Slide 471 text

range >>> >>> range(10)

Slide 472

Slide 472 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>>

Slide 473

Slide 473 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10)

Slide 474

Slide 474 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>>

Slide 475

Slide 475 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2)

Slide 476

Slide 476 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>>

Slide 477

Slide 477 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1)

Slide 478

Slide 478 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] >>>

Slide 479

Slide 479 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] >>>

Slide 480

Slide 480 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] >>> range(stop)

Slide 481

Slide 481 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] >>> range(stop) range(start, stop)

Slide 482

Slide 482 text

range >>> >>> range(10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] >>> >>> range(10) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> range(3, 10) [3, 4, 5, 6, 7, 8, 9] >>> range(1, 10, 2) [1, 3, 5, 7, 9] >>> range(10, 0, -1) [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] >>> range(stop) range(start, stop) range(start, stop, step)

Slide 483

Slide 483 text

>>> filter

Slide 484

Slide 484 text

>>> >>> x = range(1, 11) filter

Slide 485

Slide 485 text

>>> >>> x = range(1, 11) >>> x = range(1, 11) >>> filter

Slide 486

Slide 486 text

>>> >>> x = range(1, 11) >>> x = range(1, 11) >>> >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) filter

Slide 487

Slide 487 text

>>> >>> x = range(1, 11) >>> x = range(1, 11) >>> >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) [2, 4, 6, 8, 10] >>> filter

Slide 488

Slide 488 text

>>> >>> x = range(1, 11) >>> x = range(1, 11) >>> >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) [2, 4, 6, 8, 10] >>> >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) [2, 4, 6, 8, 10] >>> filter

Slide 489

Slide 489 text

>>> >>> x = range(1, 11) >>> x = range(1, 11) >>> >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) [2, 4, 6, 8, 10] >>> >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) [2, 4, 6, 8, 10] >>> filter a function receive one parameter and return boolean value

Slide 490

Slide 490 text

>>> >>> x = range(1, 11) >>> x = range(1, 11) >>> >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) [2, 4, 6, 8, 10] >>> >>> x = range(1, 11) >>> filter(lambda k: k % 2 == 0, x) [2, 4, 6, 8, 10] >>> filter a function receive one parameter and return boolean value iterable object

Slide 491

Slide 491 text

>>> map

Slide 492

Slide 492 text

>>> >>> x = range(1, 6) map

Slide 493

Slide 493 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> map

Slide 494

Slide 494 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> map(lambda k: k * k, x) map

Slide 495

Slide 495 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> map(lambda k: k * k, x) >>> x = range(1, 6) >>> map(lambda k: k * k, x) [1, 4, 9, 16, 25] >>> map

Slide 496

Slide 496 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> map(lambda k: k * k, x) >>> x = range(1, 6) >>> map(lambda k: k * k, x) [1, 4, 9, 16, 25] >>> >>> x = range(1, 6) >>> map(lambda k: k * k, x) [1, 4, 9, 16, 25] >>> map

Slide 497

Slide 497 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> map(lambda k: k * k, x) >>> x = range(1, 6) >>> map(lambda k: k * k, x) [1, 4, 9, 16, 25] >>> >>> x = range(1, 6) >>> map(lambda k: k * k, x) [1, 4, 9, 16, 25] >>> map any function receive one parameter

Slide 498

Slide 498 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> map(lambda k: k * k, x) >>> x = range(1, 6) >>> map(lambda k: k * k, x) [1, 4, 9, 16, 25] >>> >>> x = range(1, 6) >>> map(lambda k: k * k, x) [1, 4, 9, 16, 25] >>> map any function receive one parameter iterable object

Slide 499

Slide 499 text

>>> reduce

Slide 500

Slide 500 text

>>> >>> x = range(1, 6) reduce

Slide 501

Slide 501 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> reduce

Slide 502

Slide 502 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) reduce

Slide 503

Slide 503 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) 21909 >>> reduce

Slide 504

Slide 504 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) 21909 >>> >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) 21909 >>> reduce

Slide 505

Slide 505 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) 21909 >>> >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) 21909 >>> reduce any function receive two parameters

Slide 506

Slide 506 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) 21909 >>> >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) 21909 >>> reduce any function receive two parameters iterable object

Slide 507

Slide 507 text

>>> >>> x = range(1, 6) >>> x = range(1, 6) >>> >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) 21909 >>> >>> x = range(1, 6) >>> reduce(lambda a, b: a**2 + b, x) 21909 >>> reduce any function receive two parameters iterable object calculate ((((1^2)+2)^2+3)^2+4)^2+5

Slide 508

Slide 508 text

>>> factorial

Slide 509

Slide 509 text

>>> >>> reduce(lambda a, b: a * b, range(1, 6)) factorial

Slide 510

Slide 510 text

>>> >>> reduce(lambda a, b: a * b, range(1, 6)) >>> reduce(lambda a, b: a * b, range(1, 6)) 120 >>> factorial

Slide 511

Slide 511 text

Comprehension

Slide 512

Slide 512 text

List Comprehension >>>

Slide 513

Slide 513 text

List Comprehension >>> >>> [i**2 for i in range(1, 6)]

Slide 514

Slide 514 text

List Comprehension >>> >>> [i**2 for i in range(1, 6)] >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>>

Slide 515

Slide 515 text

List Comprehension >>> >>> [i**2 for i in range(1, 6)] >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)]

Slide 516

Slide 516 text

List Comprehension >>> >>> [i**2 for i in range(1, 6)] >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] ['0', '1', '2', '3', '4'] >>>

Slide 517

Slide 517 text

List Comprehension >>> >>> [i**2 for i in range(1, 6)] >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] ['0', '1', '2', '3', '4'] >>> >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] ['0', '1', '2', '3', '4'] >>>

Slide 518

Slide 518 text

List Comprehension >>> >>> [i**2 for i in range(1, 6)] >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] ['0', '1', '2', '3', '4'] >>> >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] ['0', '1', '2', '3', '4'] >>> processing & return value

Slide 519

Slide 519 text

List Comprehension >>> >>> [i**2 for i in range(1, 6)] >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] ['0', '1', '2', '3', '4'] >>> >>> [i**2 for i in range(1, 6)] [1, 4, 9, 16, 25] >>> [str(i) for i in range(5)] ['0', '1', '2', '3', '4'] >>> processing & return value iterable object

Slide 520

Slide 520 text

>>> Dict Comprehension

Slide 521

Slide 521 text

>>> >>> {i: i**2 for i in range(1, 6)} Dict Comprehension

Slide 522

Slide 522 text

>>> >>> {i: i**2 for i in range(1, 6)} >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> Dict Comprehension

Slide 523

Slide 523 text

>>> >>> {i: i**2 for i in range(1, 6)} >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} Dict Comprehension

Slide 524

Slide 524 text

>>> >>> {i: i**2 for i in range(1, 6)} >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} {0: '0', 1: '1', 2: '2', 3: '3', 4: '4'} >>> Dict Comprehension

Slide 525

Slide 525 text

>>> >>> {i: i**2 for i in range(1, 6)} >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} {0: '0', 1: '1', 2: '2', 3: '3', 4: '4'} >>> >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} {0: '0', 1: '1', 2: '2', 3: '3', 4: '4'} >>> Dict Comprehension

Slide 526

Slide 526 text

>>> >>> {i: i**2 for i in range(1, 6)} >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} {0: '0', 1: '1', 2: '2', 3: '3', 4: '4'} >>> >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} {0: '0', 1: '1', 2: '2', 3: '3', 4: '4'} >>> Dict Comprehension processing & return value

Slide 527

Slide 527 text

>>> >>> {i: i**2 for i in range(1, 6)} >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} {0: '0', 1: '1', 2: '2', 3: '3', 4: '4'} >>> >>> {i: i**2 for i in range(1, 6)} {1: 1, 2: 4, 3: 9, 4: 16, 5: 25} >>> {i: str(i) for i in range(5)} {0: '0', 1: '1', 2: '2', 3: '3', 4: '4'} >>> Dict Comprehension processing & return value iterable object

Slide 528

Slide 528 text

>>> Generator Comprehension

Slide 529

Slide 529 text

>>> >>> (i**2 for i in range(1, 6)) Generator Comprehension

Slide 530

Slide 530 text

>>> >>> (i**2 for i in range(1, 6)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> Generator Comprehension

Slide 531

Slide 531 text

>>> >>> (i**2 for i in range(1, 6)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) Generator Comprehension

Slide 532

Slide 532 text

>>> >>> (i**2 for i in range(1, 6)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> Generator Comprehension

Slide 533

Slide 533 text

>>> >>> (i**2 for i in range(1, 6)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> Generator Comprehension

Slide 534

Slide 534 text

>>> >>> (i**2 for i in range(1, 6)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> Generator Comprehension processing & return value

Slide 535

Slide 535 text

>>> >>> (i**2 for i in range(1, 6)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> Generator Comprehension processing & return value iterable object

Slide 536

Slide 536 text

>>> >>> (i**2 for i in range(1, 6)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> Generator Comprehension processing & return value iterable object it contains the rule in the object

Slide 537

Slide 537 text

>>> >>> (i**2 for i in range(1, 6)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> >>> (i**2 for i in range(1, 6)) at 0x110494690> >>> (str(i) for i in range(5)) at 0x1104946e0> >>> Generator Comprehension processing & return value iterable object it contains the rule in the object save the memory

Slide 538

Slide 538 text

Use a Generator >>>

Slide 539

Slide 539 text

Use a Generator >>> >>> x = (i**2 for i in range(5))

Slide 540

Slide 540 text

Use a Generator >>> >>> x = (i**2 for i in range(5)) >>> x = (i**2 for i in range(5)) >>>

Slide 541

Slide 541 text

Use a Generator >>> >>> x = (i**2 for i in range(5)) >>> x = (i**2 for i in range(5)) >>> >>> x = (i**2 for i in range(5)) >>> x

Slide 542

Slide 542 text

Use a Generator >>> >>> x = (i**2 for i in range(5)) >>> x = (i**2 for i in range(5)) >>> >>> x = (i**2 for i in range(5)) >>> x >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>>

Slide 543

Slide 543 text

Use a Generator >>> >>> x = (i**2 for i in range(5)) >>> x = (i**2 for i in range(5)) >>> >>> x = (i**2 for i in range(5)) >>> x >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x:

Slide 544

Slide 544 text

Use a Generator >>> >>> x = (i**2 for i in range(5)) >>> x = (i**2 for i in range(5)) >>> >>> x = (i**2 for i in range(5)) >>> x >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: ...

Slide 545

Slide 545 text

Use a Generator >>> >>> x = (i**2 for i in range(5)) >>> x = (i**2 for i in range(5)) >>> >>> x = (i**2 for i in range(5)) >>> x >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: ... >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: ... print i

Slide 546

Slide 546 text

Use a Generator >>> >>> x = (i**2 for i in range(5)) >>> x = (i**2 for i in range(5)) >>> >>> x = (i**2 for i in range(5)) >>> x >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: ... >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: ... print i >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: ... print i ...

Slide 547

Slide 547 text

Use a Generator >>> >>> x = (i**2 for i in range(5)) >>> x = (i**2 for i in range(5)) >>> >>> x = (i**2 for i in range(5)) >>> x >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: ... >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: ... print i >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: ... print i ... >>> x = (i**2 for i in range(5)) >>> x at 0x110494690> >>> for i in x: ... print i ... 0 1 4 9 16 >>>

Slide 548

Slide 548 text

Help Yourself

Slide 549

Slide 549 text

>>> Help

Slide 550

Slide 550 text

>>> >>> help(reduce) Help

Slide 551

Slide 551 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, Help

Slide 552

Slide 552 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates Help

Slide 553

Slide 553 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is Help

Slide 554

Slide 554 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items Help

Slide 555

Slide 555 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and Help

Slide 556

Slide 556 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the Help

Slide 557

Slide 557 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. Help

Slide 558

Slide 558 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. (END) Help

Slide 559

Slide 559 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. (END) Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. (END) Help

Slide 560

Slide 560 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. (END) Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. (END) press q Help

Slide 561

Slide 561 text

>>> >>> help(reduce) Help on built-in function reduce in module __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, __builtin__: reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is reduce(...) reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items reduce(function, sequence[, initial]) - > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and > value Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. (END) Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value. For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates ((((1+2)+3)+4)+5). If initial is present, it is placed before the items of the sequence in the calculation, and serves as a default when the sequence is empty. (END) press q >>> help(reduce) >>> Help

Slide 562

Slide 562 text

pip

Slide 563

Slide 563 text

pip Package manager for Python Download package in PyPI (Python Package Index)

Slide 564

Slide 564 text

pip Package manager for Python Download package in PyPI (Python Package Index) https://pypi.python.org/pypi

Slide 565

Slide 565 text

Python Package Index

Slide 566

Slide 566 text

Python Package Index There are currently 31069 packages here.

Slide 567

Slide 567 text

Install pip $ apt-get install python-pip For Ubuntu $ brew install python For OS X

Slide 568

Slide 568 text

Install Pip on Windows Go to https://pypi.python.org/pypi/distribute/0.6.45. Download the source code, and unzip it. Go to the directory and execute the following command. > python.exe setup.py install Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip, and download pip installer.

Slide 569

Slide 569 text

Basic Command $ pip install [package_name] Install Package $ pip uninstall [package_name] Uninstall Package $ pip search [package_name] Search Package

Slide 570

Slide 570 text

All Command bundle create pybundles freeze output all currently installed packages (exact versions) to stdout help show available commands install install packages search search PyPI uninstall uninstall packages unzip unzip individual packages zip zip individual packages

Slide 571

Slide 571 text

Install lxml $

Slide 572

Slide 572 text

Install lxml $ $ pip install lxml

Slide 573

Slide 573 text

Install lxml $ $ pip install lxml $ pip install lxml Downloading/unpacking lxml $ pip install lxml Downloading/unpacking lxml Downloading lxml-3.2.1.tar.gz (3.3MB): 3.3MB downloaded Running setup.py egg_info for package lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Downloading/unpacking lxml Downloading lxml-3.2.1.tar.gz (3.3MB): 3.3MB downloaded Running setup.py egg_info for package lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Downloading lxml-3.2.1.tar.gz (3.3MB): 3.3MB downloaded Running setup.py egg_info for package lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. 3.3MB downloaded Running setup.py egg_info for package lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt Running setup.py egg_info for package lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 warning: no previously-included files Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 warning: no previously-included files found matching '*.py' lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 warning: no previously-included files found matching '*.py' warning: no files found matching UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 warning: no previously-included files found matching '*.py' warning: no files found matching '*.txt' under directory 'src/lxml/tests' 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 warning: no previously-included files found matching '*.py' warning: no files found matching '*.txt' under directory 'src/lxml/tests' Installing collected packages: lxml warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 warning: no previously-included files found matching '*.py' warning: no files found matching '*.txt' under directory 'src/lxml/tests' Installing collected packages: lxml Running setup.py install for lxml Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 warning: no previously-included files found matching '*.py' warning: no files found matching '*.txt' under directory 'src/lxml/tests' Installing collected packages: lxml Running setup.py install for lxml /usr/local/Cellar/python/2.7.5/ Building without Cython. Using build configuration of libxslt 1.1.26 warning: no previously-included files found matching '*.py' warning: no files found matching '*.txt' under directory 'src/lxml/tests' Installing collected packages: lxml Running setup.py install for lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ Using build configuration of libxslt 1.1.26 warning: no previously-included files found matching '*.py' warning: no files found matching '*.txt' under directory 'src/lxml/tests' Installing collected packages: lxml Running setup.py install for lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: 1.1.26 warning: no previously-included files found matching '*.py' warning: no files found matching '*.txt' under directory 'src/lxml/tests' Installing collected packages: lxml Running setup.py install for lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: warning: no previously-included files found matching '*.py' warning: no files found matching '*.txt' under directory 'src/lxml/tests' Installing collected packages: lxml Running setup.py install for lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' found matching '*.py' warning: no files found matching '*.txt' under directory 'src/lxml/tests' Installing collected packages: lxml Running setup.py install for lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. warning: no files found matching '*.txt' under directory 'src/lxml/tests' Installing collected packages: lxml Running setup.py install for lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. '*.txt' under directory 'src/lxml/tests' Installing collected packages: lxml Running setup.py install for lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt Installing collected packages: lxml Running setup.py install for lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 Running setup.py install for lxml /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 building 'lxml.etree' extension /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 building 'lxml.etree' extension cc -fno-strict-aliasing -fno-common - Frameworks/Python.framework/Versions/2.7/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 building 'lxml.etree' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 building 'lxml.etree' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 'bugtrack_url' warnings.warn(msg) Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 building 'lxml.etree' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ Building lxml version 3.2.1. Building without Cython. Using build configuration of libxslt 1.1.26 building 'lxml.etree' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Building without Cython. Using build configuration of libxslt 1.1.26 building 'lxml.etree' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Using build configuration of libxslt 1.1.26 building 'lxml.etree' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ 1.1.26 building 'lxml.etree' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.etree.c -o cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -flat_namespace dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -flat_namespace clang: warning: argument unused during opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' src/lxml/lxml.etree.c:136289:17: libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' src/lxml/lxml.etree.c:136289:17: warning: enumeration value 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' src/lxml/lxml.etree.c:136289:17: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' src/lxml/lxml.etree.c:136289:17: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch] Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' src/lxml/lxml.etree.c:136289:17: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch] switch (__pyx_v_doc_ref->_type) { python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' src/lxml/lxml.etree.c:136289:17: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch] switch (__pyx_v_doc_ref->_type) { ^ lxml.etree.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' src/lxml/lxml.etree.c:136289:17: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch] switch (__pyx_v_doc_ref->_type) { ^ src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing clang: warning: argument unused during compilation: '-flat_namespace' src/lxml/lxml.etree.c:136289:17: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch] switch (__pyx_v_doc_ref->_type) { ^ src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext compilation: '-flat_namespace' src/lxml/lxml.etree.c:136289:17: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch] switch (__pyx_v_doc_ref->_type) { ^ src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct src/lxml/lxml.etree.c:136289:17: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch] switch (__pyx_v_doc_ref->_type) { ^ src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch] switch (__pyx_v_doc_ref->_type) { ^ src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch] switch (__pyx_v_doc_ref->_type) { ^ src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject not handled in switch [-Wswitch] switch (__pyx_v_doc_ref->_type) { ^ src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy switch (__pyx_v_doc_ref->_type) { ^ src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct { ^ src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext ^ src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! src/lxml/lxml.etree.c:140375:72: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct *)__pyx_v_self->_context))); if (unlikely(! __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext __pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L9;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext __LINE__; goto __pyx_L9;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:141781:70: src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:141781:70: warning: incompatible pointer types passing passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:141781:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:141781:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:141781:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:141781:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:141781:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy *__pyx_v_self) { ^ src/lxml/lxml.etree.c:141781:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct ^ src/lxml/lxml.etree.c:141781:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext ^ src/lxml/lxml.etree.c:141781:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if src/lxml/lxml.etree.c:141781:70: warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = warning: incompatible pointer types passing 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; 'struct __pyx_obj_4lxml_5etree__BaseContext *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto *' to parameter of type 'struct __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_obj_4lxml_5etree__XSLTContext *' [- Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Wincompatible-pointer-types] __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *)__pyx_f_4lxml_5etree_12_XSLTContext__copy (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: (((struct __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter __pyx_obj_4lxml_5etree__BaseContext *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here *)__pyx_v_stylesheet->_context))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext __pyx_f[2]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( __pyx_clineno = __LINE__; goto __pyx_L1_error;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext __pyx_L1_error;} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:160712:19: src/lxml/lxml.etree.c:138310:138: note: passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:160712:19: warning: expression result unused [- passing argument to parameter '__pyx_v_self' here static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:160712:19: warning: expression result unused [- Wunused-value] static struct __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:160712:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ __pyx_obj_4lxml_5etree__BaseContext *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:160712:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ *__pyx_f_4lxml_5etree_12_XSLTContext__copy( struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:160712:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ struct __pyx_obj_4lxml_5etree__XSLTContext *__pyx_v_self) { ^ src/lxml/lxml.etree.c:160712:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: *__pyx_v_self) { ^ src/lxml/lxml.etree.c:160712:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ^ src/lxml/lxml.etree.c:160712:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), ^ src/lxml/lxml.etree.c:160712:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) src/lxml/lxml.etree.c:160712:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:162525:19: PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- Wunused-value] /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ^ src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), ^ src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) src/lxml/lxml.etree.c:162525:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:168081:19: PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- Wunused-value] /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ^ src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), ^ src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) src/lxml/lxml.etree.c:168081:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:170771:19: PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- Wunused-value] /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ^ src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), ^ src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) src/lxml/lxml.etree.c:170771:19: warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) warning: expression result unused [- Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ Wunused-value] PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:12770:13: PyObject_INIT(o, t); ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:12770:13: warning: function ^ /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:12770:13: warning: function '__pyx_f_4lxml_5etree_displayNode' is not /usr/local/Cellar/python/2.7.5/ Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:12770:13: warning: function '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- Frameworks/Python.framework/Versions/2.7/ include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:12770:13: warning: function '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- internal-declaration] include/python2.7/objimpl.h:164:69: note: expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:12770:13: warning: function '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- internal-declaration] static void expanded from macro 'PyObject_INIT' ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:12770:13: warning: function '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- internal-declaration] static void __pyx_f_4lxml_5etree_displayNode(xmlNode ( Py_TYPE(op) = (typeobj), _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:12770:13: warning: function '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- internal-declaration] static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) _Py_NewReference((PyObject *)(op)), (op) ) ^ src/lxml/lxml.etree.c:12770:13: warning: function '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- internal-declaration] static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ src/lxml/lxml.etree.c:12770:13: warning: function '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- internal-declaration] static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ ^ src/lxml/lxml.etree.c:12770:13: warning: function '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- internal-declaration] static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ 8 warnings generated. src/lxml/lxml.etree.c:12770:13: warning: function '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- internal-declaration] static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ 8 warnings generated. cc -bundle -undefined dynamic_lookup - warning: function '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- internal-declaration] static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ 8 warnings generated. cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib '__pyx_f_4lxml_5etree_displayNode' is not needed and will not be emitted [-Wunneeded- internal-declaration] static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ 8 warnings generated. cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ needed and will not be emitted [-Wunneeded- internal-declaration] static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ 8 warnings generated. cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm internal-declaration] static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ 8 warnings generated. cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ static void __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ 8 warnings generated. cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so __pyx_f_4lxml_5etree_displayNode(xmlNode *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ 8 warnings generated. cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so building 'lxml.objectify' extension *__pyx_v_c_node, PyObject *__pyx_v_indent) { ^ 8 warnings generated. cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - { ^ 8 warnings generated. cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ ^ 8 warnings generated. cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 8 warnings generated. cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ -o build/lib.macosx-10.8-x86_64-2.7/lxml/ etree.so building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ etree.so building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o building 'lxml.objectify' extension cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ cc -fno-strict-aliasing -fno-common - dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace dynamic -I/usr/local/include -I/usr/local/ opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace clang: warning: argument unused during opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' -Wall -Wstrict-prototypes -I/usr/include/ libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - libxml2 -I/private/var/folders/yx/ 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib 3cgqr5y50vnf9ts91m5x073r0000gn/T/pip-build- KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ KuoE0/lxml/src/lxml/includes -I/usr/local/ Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -lxslt -lexslt -lxml2 -lz Cellar/python/2.7.5/Frameworks/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/ Python.framework/Versions/2.7/include/ python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/ lxml/objectify.so python2.7 -c src/lxml/lxml.objectify.c -o build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/ lxml/objectify.so build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/ lxml/objectify.so warning: no files found matching lxml.objectify.o -flat_namespace clang: warning: argument unused during compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/ lxml/objectify.so warning: no files found matching '*.txt' under directory 'src/lxml/tests' clang: warning: argument unused during compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/ lxml/objectify.so warning: no files found matching '*.txt' under directory 'src/lxml/tests' Successfully installed lxml compilation: '-flat_namespace' cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/ lxml/objectify.so warning: no files found matching '*.txt' under directory 'src/lxml/tests' Successfully installed lxml Cleaning up... cc -bundle -undefined dynamic_lookup - L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-x86_64-2.7/src/lxml/ lxml.objectify.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.macosx-10.8-x86_64-2.7/ lxml/objectify.so warning: no files found matching '*.txt' under directory 'src/lxml/tests' Successfully installed lxml Cleaning up... $

Slide 574

Slide 574 text

Use lxml >>>

Slide 575

Slide 575 text

Use lxml >>> >>> import lxml

Slide 576

Slide 576 text

Use lxml >>> >>> import lxml >>> import lxml >>>

Slide 577

Slide 577 text

SimpleHTTPServer

Slide 578

Slide 578 text

Launch a Web Server $

Slide 579

Slide 579 text

Launch a Web Server $ $ pythom -m SimpleHTTPServer

Slide 580

Slide 580 text

Launch a Web Server $ $ pythom -m SimpleHTTPServer $ pythom -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ...

Slide 581

Slide 581 text

Connect to http://localhost:8000

Slide 582

Slide 582 text

Thank You for Your Listening.