Python Essentials Training (PYT438)
Learn Python fundamentals through core syntax, functions, strings, data structures, flow control, files, regex, testing, and OOP to build real programs.
Register or Request Training
- Private class for your team
- Live expert instructor
- Online or on‑location
- Customizable agenda
- Proposal responses same day as request
Course Overview
This instructor-led Python essentials course provides a practical introduction to Python programming, from writing and running scripts to working with common libraries and data formats. It is designed for beginners and for learners who want a stronger foundation in core Python concepts.
You will learn Python syntax and program structure; functions and modules; string handling; built-in data types and collections (lists, tuples, dictionaries, and sets); and control flow with conditionals and loops. The course also covers virtual environments and pip, file processing with os and paths, dates and times with time and datetime, and coding style with PEP 8 and Pylint.
As you progress, you will practice more advanced techniques such as comprehensions, lambda functions, and selected tools from the collections module. You will also work with regular expressions, read and write data in CSV/XML/JSON, interact with SQLite, and build confidence with testing and debugging using unittest. The course concludes with object-oriented programming concepts including classes, inheritance, properties, and decorators.
Course Benefits
- Write Python scripts with confidence.
- Code with ease using Python Standard Library script modules.
- Complete math operations with Python.
- Access data in a Python program using string indexing and slicing strings.
- Leverage data structures like sequences, dictionaries, and sets.
- Use flow control tools to manage the execution of your program.
- Strengthen your code with exception handling, testing, and debugging.
- Quickly match, locate, and manage text using regular expressions.
- Handle date and time with confidence.
- Read, write, and edit files using Python.
- Create reusable code to save time later.
- Work with various data sources.
- Use Python's object-oriented features to create flexible code that is easier to maintain.
Course Outline
- Python Basics
- Getting Familiar with the Terminal
- Running Python
- Running a Python File
- Exercise: Hello, world!
- Literals
- Exercise: Exploring Types
- Variables
- Exercise: A Simple Python Script
- Constants and Deleting Variables
- Writing a Python Module
- print() Function
- Collecting User Input
- Exercise: Hello, You!
- Reading from and Writing to Files
- Exercise: Working with Files
- Functions and Modules
- Defining Functions
- Variable Scope
- Global Variables
- Function Parameters
- Exercise: A Function with Parameters
- Returning Values
- Exercise: Parameters with Default Values
- Returning Values
- Importing Modules
- Methods vs. Functions
- Math
- Arithmetic Operators
- Exercise: Floor and Modulus
- Assignment Operators
- Precedence of Operations
- Built-in Math Functions
- The math Module
- The random Module
- Exercise: How Many Pizzas Do We Need?
- Exercise: Dice Rolling
- Python Strings
- Quotation Marks and Special Characters
- String Indexing
- Exercise: Indexing Strings
- Slicing Strings
- Exercise: Slicing Strings
- Concatenation and Repetition
- Exercise: Repetition
- Combining Concatenation and Repetition
- Python Strings are Immutable
- Common String Methods
- String Formatting
- Exercise: Playing with Formatting
- Formatted String Literals (f-strings) (introduced in Python 3.6)
- Built-in String Functions
- Exercise: Outputting Tab-delimited Text
- Iterables: Sequences, Dictionaries, and Sets
- Definitions
- Sequences
- Lists
- Sequences and Random
- Exercise: Remove and Return Random Element
- Tuples
- Ranges
- Converting Sequences to Lists
- Indexing
- Exercise: Simple Rock, Paper, Scissors Game
- Slicing
- Exercise: Slicing Sequences
- min(), max(), and sum()
- Converting between Sequences and Strings
- Unpacking Sequences
- Dictionaries
- The len() Function
- Exercise: Creating a Dictionary from User Input
- Sets
- *args and **kwargs
- Virtual Environments, Packages, and pip
- Exercise: Creating, Activiting, Deactivating, and Deleting a Virtual Environment
- Packages with pip
- Exercise: Working with a Virtual Environment
- Flow Control
- Conditional Statements
- Compound Conditions
- The is and is not Operators
- all() and any() and the Ternary Operator
- In Between
- Loops in Python
- Exercise: All True and Any True
- break and continue
- Looping through Lines in a File
- Exercise: Word Guessing Game
- The else Clause in Loops
- Exercise: for...else
- The enumerate() Function
- Generators
- List Comprehensions
- Exception Handling
- Exception Basics
- Generic Exceptions
- Exercise: Raising Exceptions
- The else and finally Clauses
- Using Exceptions for Flow Control
- Exercise: Running Sum
- Raising Your Own Exceptions
- Python Dates and Times
- Understanding Time
- The time Module
- Time Structures
- Times as Strings
- Time and Formatted Strings
- Pausing Execution with time.sleep()
- The datetime Module
- datetime.datetime Objects
- Exercise: What Color Pants Should I Wear?
- datetime.timedelta Objects
- Exercise: Report on Departure Times
- File Processing
- Opening Files
- Exercise: Finding Text in a File
- Writing to Files
- Exercise: Writing to Files
- Exercise: List Creator
- The os Module
- os.walk()
- The os.path Module
- A Better Way to Open Files
- Exercise: Comparing Lists
- PEP8 and Pylint
- PEP8
- Pylint
- Advanced Python Concepts
- Lambda Functions
- Advanced List Comprehensions
- Exercise: Rolling Five Dice
- Collections Module
- Exercise: Creating a defaultdict
- Counters
- Exercise: Creating a Counter
- Mapping and Filtering
- Mutable and Immutable Built-in Objects
- Sorting
- Exercise: Converting list.sort() to sorted(iterable)
- Sorting Sequences of Sequences
- Creating a Dictionary from Two Sequences
- Unpacking Sequences in Function Calls
- Exercise: Converting a String to a datetime.date Object
- Modules and Packages
- Regular Expressions
- Regular Expression Tester
- Regular Expression Syntax
- Python's Handling of Regular Expressions
- Exercise: Green Glass Door
- Working with Data
- Virtual Environment
- Relational Databases
- Passing Parameters
- SQLite
- Exercise: Querying a SQLite Database
- SQLite Database in Memory
- Exercise: Inserting File Data into a Database
- Drivers for Other Databases
- CSV
- Exercise: Finding Data in a CSV File
- Creating a New CSV File
- Exercise: Creating a CSV with DictWriter
- Getting Data from the Web
- Exercise: HTML Scraping
- XML
- JSON
- Exercise: JSON Home Runs
- Testing and Debugging
- Testing for Performance
- Exercise: Comparing Times to Execute
- The unittest Module
- Exercise: Fixing Functions
- Special unittest.TestCase Methods
- Classes and Objects
- Attributes
- Behaviors
- Classes vs. Objects
- Attributes and Methods
- Exercise: Adding a roll() Method to Die
- Private Attributes
- Properties
- Exercise: Properties
- Objects that Track their Own History
- Documenting Classes
- Exercise: Documenting the Die Class
- Inheritance
- Exercise: Extending the Die Class
- Extending a Class Method
- Exercise: Extending the roll() Method
- Static Methods
- Class Attributes and Methods
- Abstract Classes and Methods
- Understanding Decorators
Delivery Methods
Live expert-led online training from anywhere. Guaranteed to run .
Delivered for your team at your site or online.
Class Materials
Each student receives a comprehensive set of materials, including course notes and all class examples.
Class Prerequisites
Experience in the following would be useful for this Python class:
- Some prior programming experience is helpful.
Have questions about this course?
We can help with curriculum details, delivery options, pricing, or anything else. Reach out and we’ll point you in the right direction.
