Overview
The Python training course leads participants from the basics of writing and running Python scripts to more advanced features such as file operations, regular expressions, working with binary data, and using the extensive functionality of Python modules. Extra emphasis is placed on features unique to Python, such as tuples, array slices, and output formatting.
Objectives
At the end of Python training course, participants will be able to
Prerequisites
Participants should already be comfortable using the operating system (Linux, Unix, Windows, Solaris, macOS, etc.) on which they will be running Python. While not mandatory, basic skills with at least one other programming language are desirable.
Course Outline
- What is Python?Interpreted languages
- Advantages and disadvantages
- Downloading and installing
- Which version of Python
- Where to find documentation
- Structure of a Python script
- Using the interpreter interactively
- Running standalone scripts under Unix and Windows
- Using variables
- String types: normal, raw and Unicode
- String operators and expressions
- Math operators and expressions
- Writing to the screen
- Command line parameters
- Reading from the keyboard
- About flow control
- Indenting is significant
- The if and elif statements
- while loops
- Using lists
- Using the for statement
- The range() function
- list operations
- list methods
- Strings are special kinds of lists
- tuples
- Text file I/O overview
- Opening a text file
- Reading text files
- Raw (binary) data
- Writing to a text file
- Dictionary overview
- Creating dictionaries
- Dictionary functions
- Fetching keys or values
- Testing for existence of elements
- Deleting elements
- Sets And Frozen Sets
- Syntax of function definition
- Formal parameters
- Global versus local variables
- Passing parameters and returning values
- The sorted() function
- Alternate keys
- Multiple keys
- Lambda functions
- Dealing with syntax errors
- Exceptions
- Handling exceptions with try/except
- Cleaning up with finally
- What is a module?
- The import statement
- Function aliases
- Packages
- RE Objects
- Pattern matching
- Parsing data
- Subexpressions
- Complex substitutions
- RE tips and tricks
- Working with the operating system
- Grabbing web pages
- Sending email
- math and random
- Accessing dates and times with datetime
- Working with compressed files
- About o-o programming
- Defining classes
- Constructors
- Instance methods
- Instance data
- Class methods and data
- Destructors