[Go to site: main page, start]

0% found this document useful (0 votes)
14 views4 pages

Beginner's Guide to Python Programming

The Python tutorial introduces the Python programming language, highlighting its ease of learning, powerful features, and extensive standard library. It provides a hands-on approach to understanding basic concepts, data structures, and functionalities, while also offering guidance on writing modules and programs. The tutorial is not exhaustive but aims to give a clear idea of Python's style and capabilities, preparing readers for further exploration of its libraries and modules.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Beginner's Guide to Python Programming

The Python tutorial introduces the Python programming language, highlighting its ease of learning, powerful features, and extensive standard library. It provides a hands-on approach to understanding basic concepts, data structures, and functionalities, while also offering guidance on writing modules and programs. The tutorial is not exhaustive but aims to give a clear idea of Python's style and capabilities, preparing readers for further exploration of its libraries and modules.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

The Python tutorial

Python is a powerful and easy-to-learn programming language. It has structures of


efficient high-level data and a simple yet effective object-oriented programming system
objects. The elegant syntax of Python and its dynamic typing, along with its nature
interpreted turns it into an ideal language for scripting and rapid development
applications in many areas, for most platforms.

The Python interpreter and the extensive standard library are available for free.
en código fuente y de forma binaria para la mayoría de las plataformas desde la Web de
Python[Link] and they can be distributed freely. The same site also
it contains distributions and references to many free third-party Python modules,
programs, tools, and additional documentation.

The Python interpreter is easily extensible with functions and data types.
implemented in C or C++ (or other languages that can be called from C). Python
it is also suitable as a language for extending modifiable applications.

This tutorial informally introduces the reader to the basic concepts and functionalities.
of the Python programming language and its system. It helps to have a Python interpreter
accessible for a hands-on experience, all examples are self-contained,
allowing the tutorial to be used offline.

For a description of standard objects and modules, see The Standard Library
Python Language Reference where a more formal definition is provided
language. To write extensions in C or C++, read Extension and embedding of the
Python Interpreter API Reference Manual in C. There are various
books that cover Python in detail.

This tutorial is not intended to be exhaustive nor cover each of the features of
language, not even the most commonly used. Instead, it aims to introduce many of the
most notable features and provide a clear idea of the style and type of language
What is Python. After reading it, you will be able to read and write modules and programs in Python, and
you will be ready to learn more about the various libraries and modules described in the
Python Standard Library.

It is interesting to read the Glossary.

Opening the appetite


2. Using the Python interpreter
o2.1. Invoking the interpreter
. 2.1.1. Passing arguments
. 2.1.2. Interactive mode
o2.2. The interpreter and its environment

. 2.2.1. Source code encoding


3. An informal introduction to Python
o3.1. Using Python as a calculator
. 3.1.1. Numbers
. 3.1.2. Character strings
. 3.1.3. Lists
o3.2. First steps towards programming
4. More tools for flow control
o4.1. The if statement
o4.2. The sentence for
4.3. The function range()
4.4. The break, continue, and else statements in loops
o4.5. The pass sentence
o4.6. The sentence match
4.7. Defining functions
o4.8. More about function definition
. 4.8.1. Arguments with default values
. 4.8.2. Keyword arguments
. 4.8.3. Special parameters
. [Link]. Positional arguments or keyword arguments
. [Link]. Positional parameters only
. [Link]. Keyword-only arguments
. [Link]. Examples of Functions
. [Link]. Summary
. 4.8.4. Lists of arbitrary arguments
. 4.8.5. Unpacking a list of arguments
. 4.8.6. Lambda expressions
. 4.8.7. Documentation text strings
. 4.8.8. Function Annotation
o4.9. Intermezzo: Coding Style
5. Data structures
5.1. More about lists
. 5.1.1. Using lists as stacks
. 5.1.2. Using lists as queues
. 5.1.3. List comprehension
. 5.1.4. Nested list comprehensions
o5.2. The instruction of
5.3. Tuples and sequences
5.4. Sets
5.5. Dictionaries
5.6. Iteration Techniques
5.7. More about conditions
5.8. Comparing sequences and other types
6. Modules
6.1. More about the modules
. 6.1.1. Running modules as scripts
. 6.1.2. The search path for the modules
. 6.1.3. "Compiled" Python Files
o6.2. Standard modules
o6.3. The function dir()
6.4. Packages
. 6.4.1. Importing * from a package
. 6.4.2. Internal references in packages
. 6.4.3. Packages in multiple directories
7. Entry and exit
o7.1. Elegant formatting of the output
. 7.1.1. Format string literals
. 7.1.2. The format() method of strings
. 7.1.3. Manual formatting of strings
. 7.1.4. Old string formatting
7.2. Reading and writing files
. 7.2.1. File Object Methods
. 7.2.2. Save structured data with JSON
8. Errors and exceptions
8.1. Syntax errors
8.2. Exceptions
8.3. Managing exceptions
8.4. Throwing Exceptions
8.5. Chaining of exceptions
8.6. User-defined exceptions
8.7. Defining cleaning actions
o8.8. Predefined cleaning actions
9. Classes
o9.1. A few words about names and objects
o9.2. Scopes and namespaces in Python
. 9.2.1. Example of scopes and namespaces
o9.3. A first look at the classes
. 9.3.1. Class definition syntax
. 9.3.2. Class objects
. 9.3.3. Instance objects
. 9.3.4. Object method
. 9.3.5. Class and instance variables
9.4. Some observations
o9.5. Inheritance
. 9.5.1. Multiple inheritance
o9.6. Private variables
o9.7. Cambalache
o9.8. Iterators
o9.9. Generators
o9.10. Generating expressions
10. A Brief Walk Through the Standard Library
o10.1. Interface to the operating system
o10.2. File wildcards
o10.3. Command line arguments
10.4. Redirecting error output and program termination
10.5. Coincidence in chain patterns
o10.6. Mathematics
10.7. Internet access
10.8. Dates and times
o10.9. Data compression
10.10. Performance measurement
10.11. Quality control
10.12. Batteries included
11. A Short Walk Through the Standard Library - Part II
o11.1. Output format
o11.2. Templates
o11.3. Working with structured records containing binary data
o11.4. Multi-threads
o11.5. Registering
o11.6. Weak References
o11.7. Tools for working with lists
o11.8. Decimal floating point arithmetic
12. Virtual Environments and Packages
12.1. Introduction
o12.2. Creating Virtual Environments
12.3. Managing packages with pip
13. And now what?
14. Interactive input editing and history replacement
o14.1. Autocomplete with tab and editing history
o14.2. Alternatives to the interactive interpreter
15. Floating Point Arithmetic: Problems and Limitations
o15.1. Representation Error
16. Appendix
o16.1. Interactive mode
. 16.1.1. Error handling
. 16.1.2. Executable Python Programs
. 16.1.3. The interactive startup file
. 16.1.4. The customization modules

You might also like