Course Overview
Python Primer / Quick Start to Python Programming is a basic level course that provides experienced developers new to Python with basic skills needed to start using Python on the job to perform simple scripts and basic task automation. This course also serves a quick introduction to Python for technical team members or users new to Python who want to get started quickly without needing a lot of depth. Students seeking more robust hands-on training, more extensive core Python coverage or deeper skills acquisition might wish to attend another more lab-intensive course from our extensive Python training suite.
In order to do the hands-on labs, students are required to have incoming familiarity with a programming or scripting language, as this course does not teach basic programming. Students who are non-developers may attend as more of a survey course to get an overview of Python as opposed to gaining live programming skills.
Key Learning Areas
Working in a hands-on learning environment, guided by our expert team, attendees will explore:
- Uses for Python in software development, testing and systems administration environments
- How to develop basic Python applications for a variety of uses
- Packaging and distribution of Python applications and modules
Course Outline
An Overview of Python
- What is python?
- Python Timeline
- Advantages/Disadvantages of Python
- Getting help with pydoc
The Python Environment
- Starting Python
- Using the interpreter
- Running a Python script
- Python scripts on Unix/Windows
- Editors and IDEs
Getting Started
- Using variables
- Built-in functions
- Strings
- Numbers
- Converting among types
- Writing to the screen
- Command line parameters
Flow Control
- About flow control
- White space
- Conditional expressions
- Relational and Boolean operators
- While loops
- Alternate loop exits
Sequences
- About sequences
- Lists and list methods
- Tuples
- Indexing and slicing
- Iterating through a sequence
- Sequence functions, keywords, and operators
- List comprehensions
- Generator Expressions
- Nested sequences
Working with Files
- File overview
- Opening a text file
- Reading a text file
- Writing to a text file
- Reading and writing raw (binary) data
- Converting binary data with struct
Dictionaries and Sets
- About dictionaries
- Creating dictionaries
- Iterating through a dictionary
- About sets
- Creating sets
- Working with sets
Functions
- Defining functions
- Parameters
- Global and local scope
- Nested functions
- Returning values
Sorting
- The sorted() function
- Alternate keys
- Lambda functions
- Sorting collections
- Using operator.itemgetter()
- Reverse sorting
Errors and Exception Handling
- Syntax errors
- Exceptions
- Using try/catch/else/finally
- Handling multiple exceptions
- Ignoring exceptions
Bonus Sessions / Time-Permitting
Modules and Packages
- The import statement
- Module search path
- Creating Modules
- Using packages
- Function and Module aliases
Regular Expressions
- RE syntax overview
- RE Objects
- Searching and matching
- Compilation flags
- Groups and special groups
- Replacing text
- Splitting strings
The Standard Library
- The sys module
- Launching external programs
- Math functions
- Random numbers
- The string module
- Reading CSV data
Introduction to Object-Oriented Classes
- About o-o programming
- Defining classes
- Constructors
- Methods
- Instance data
- Properties
- Class methods and data
Who Benefits
This basic level course provides an excellent kick start for users new to Python, enabling them to use basic Python skills on the job in a variety of ways. Students can apply the course skills to use Python in basic web development projects or automate or simplify common tasks with the use of Python scripts. The course also serves as a solid primer course / foundation for continued Python study in support for next level web development with Python, Python for data science / machine learning or Python for systems admin or networking support.
Prerequisites
To get the most out of this course, students should have basic familiarity with any other programming or scripting language, as basic scripting isn’t covered in this agenda. Students should have a working, user-level knowledge of Unix/Linux, Mac, or Windows.
Our Python tracks include a wide variety of follow-on courses and learning paths for leveraging Python for next-level web development, data science / machine learning, networking, task automation, security, and other topics.