Python Tutorial

It is useful to a Python interpreter handy for hands-on experience, … After reading, you can read and Python modules and programs, writing ….

More PDF Content

Python Tutorial
1 Whetting Your Appetite
1 2 Using the Python Interpreter
2.1 InvokingtheInterpreter …
2.2 TheInterpreterandItsEnvironment …
4 3 An Informal Introduction to Python
3.1 UsingPythonasaCalculator …
3.2 FirstStepsTowardsProgramming … 16
4 More Control Flow Tools
4.1 if Statements … 19
4.2 for Statements … 19
4.3 The range() Function … 20
4.4 break and continue Statements, and else ClausesonLoops … 20
4.5 pass Statements … 21
4.6 DefiningFunctions … 21
4.7 MoreonDefiningFunctions … 23
5 Data Structures
5.1 MoreonLists … 27
5.2 The del statement… 31
5.3 TuplesandSequences … 31
5.4 Dictionaries … 32
5.5 LoopingTechniques … 33
5.6 MoreonConditions … 34
5.7 ComparingSequencesandOtherTypes … 35
6 Modules
6.1 MoreonModules … 38
6.2 StandardModules … 39
6.3 The dir() Function … 40
6.4 Packages … 41
7 Input and Output
7.1 FancierOutputFormatting… 45
7.2 ReadingandWritingFiles … 47
8 Errors and Exceptions
8.1 SyntaxErrors … 51
8.2 Exceptions … 51
8.3 HandlingExceptions… 52
8.4 RaisingExceptions … 54
8.5 User-definedExceptions … 54
8.6 DefiningClean-upActions … 56
9 Classes
9.1 AWordAboutTerminology … 57
9.2 PythonScopesandNameSpaces … 57
9.3 AFirstLookatClasses … 59
9.4 RandomRemarks … 61
9.5 Inheritance … 62
9.6 PrivateVariables … 63
9.7 OddsandEnds … 64
9.8 ExceptionsAreClassesToo … 64
9.9 Iterators … 65
9.10 Generators … 66
10 Brief Tour of the Standard Library
10.1 OperatingSystemInterface … 69
10.2 FileWildcards … 69
10.3 CommandLineArguments … 70
10.4 Error Output Redirection and Program Termination … 70
10.5 StringPatternMatching … 70
10.6 Mathematics … 70
10.7 InternetAccess … 71
10.8 DatesandTimes … 71
10.9 DataCompression … 72
10.10 Performance Measurement … 72
10.11 Quality Control … 73
10.12 BatteriesIncluded … 73
11 What Now?
A Interactive Input Editing and History Substitution
A.1 LineEditing … 77
A.2 HistorySubstitution … 77
A.3 KeyBindings … 77
A.4 Commentary … 79
B Floating Point Arithmetic: Issues and Limitations
B.1 RepresentationError … 83
C History and License
C.1 Historyofthesoftware … 85
C.2 Terms and conditions for accessing or otherwise using Python … 86
D Glossary
Index

Download Python Tutorial pdf from www.paradigma.com.br, 100 pages, 294.57KB.