Python Tutorial Python Release2.5b2

Python C C ++ C Python This tutorial introduces the reader informally to the basic concepts and features of the Python language and system. It helps to have a Python interpreter handy for … Python Tutorial Python CJK@disableMakeUppercase {global let }CJK@ignorespaces CJK@disableMakeUppercase {global let }CJK@ignorespaces CJK@disableMakeUppercase {global let }CJK@ignorespaces CJK@disableMakeUppercase {global let }CJK@ignorespaces Abstract Python is an easy to learn, powerful programming language. It has efficient high-level data …
large collection of standard modules that you can use as the basis of your programs—or as examples to start learning to program in Python. Some of these modules provide things like file I/O, system calls, sockets, and even interfaces to graphical user interfacetoolkits like Tk. Python Python Python Python I/O sockets Tk Python is an interpreted language, which can save you considerable time during program development because no compilation and linking is necessary. The interpreter can be used interactively, which makes it easy to experiment with features of the language, to write throw-away programs, or to test functions during bottom-up program development. It is also a handy desk calculator. Python Python enables programs to be written compactly and readably. Programs written in Python are typically much shorter than equivalentC, C ++ , or Java programs, for several reasons: Python Python CC ++ Java •the high-level data types allow you to express complex operations in a single statement; •statement grouping is done by indentation instead of beginning and ending brackets; •novariableor argument declarations are necessary. • • begin/end • Python is extensible: if you knowhow to program in Citiseasytoadda new built-in function or module to the interpreter, either to perform critical operations at maximum speed, or to link Python programs to libraries that may only be available in binary form (such as a vendor-specific graphics library). Once you are really hooked, you can link the Python interpreter into an application written in Canduseitasan extension or command language for that application. Python C Python Python C Python By the way, the language is named after the BBC show”Monty Python’sFlyingCircus”and has nothing to do with nasty reptiles. Making references to Monty Python skits in documentation is not only allowed, it is encouraged! BBC Monty Python’sFlyingCircus Monty Python Now that you are all excited about Python, you’llwanttoexamine it in some more detail. Since the best way to learn a language is touse it, the tutorial invites you to play with the Python interpreter as you read. Python Python In the next chapter, the mechanics of using the interpreter are explained. This is rather mundane information, but essential for trying out the examples shown later. 2 Chapter1. Whetting Your Appetite The rest of the tutorial introduces various features of the Python language and system through examples, beginning with simple expressions, statements and data types, through functions and modules, and finally touching upon advanced concepts like exceptions and user-defined classes. Python
Download Python Tutorial Python Release2.5b2.Pdf