Instructor-led training
Python I: Essentials Training in Margate, Florida
This four day course leads the student 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.
What you'll learn
Private Training for Teams
This course is offered as private, instructor-led training for organizations, onsite in Margate, Florida or live online. Dates, delivery format, and course content are arranged around your team's requirements.
This course is not currently scheduled as a public class for individual enrollment.
Request Group TrainingPrerequisites
Course Outline
An Overview of Python
What is Python?
The Birth of Python
Python Timeline
About Interpreted Languages
Advantages of Python
Disadvantages of Python
How to get Python
Which version of Python?
The of 2.x
Getting Help
pydoc
The Python Environment
Starting Python
If the interpreter is not in your PATHs
Using the interpreter
Trying out a few commands
Running a Python script
Python scripts on UNIX
Python scripts on Windows
Python editors and IDEs
Getting Started
Using Variables
Keywords
Built-in Functions
Variable Typing
Strings
Single-quoted string literals
Tripe-quoted string literals
Raw String literals
Unicode literals
String operators and methods
Numeric literals
Math operators and expressions
Converting among types
Writing to the screen
String formatting
Legacy string formatting
Command line parameters
Reading from the keyboard
Flow Control
About flow control
What’s with the white space?
if and elif
Conditional expressions
Relational operators
Boolean operators
while loops
Alternate ways to exit a loop
Sequences
About sequences
Lists
Tuples
Indexing and slicing
Iterating through a sequence
Functions for all sequences
Using enumerate()
Operators and keywords for sequences
The xrange() function
Nested sequences
List comprehensions
Generator expressions
Working with files
Text file I/O
Opening a text file
The with block
Reading a text file
Writing to a text file
“Binary” (raw, or non-delimited) data
Dictionaries and Sets
About dictionaries
When to use dictionaries
Creating dictionaries
Getting dictionary values
Iterating through a dictionary
Reading file data into a dictionary
Counting with dictionaries
About sets
Creating sets
Working with sets
Functions
Defining a function
Function parameters
Global variables
Variable scope
Returning values
Sorting
Sorting overview
The sorted() function
Alternate keys
Lambda functions
Sorting collections of collections
Using operator.itemgetter()
Sorting dictionaries
Sorting in reverse
Sorting lists in place
Errors and Exception Handling
Syntax errors
Exceptions
Handling exceptions with try
Handling multiple exceptions
Handling generic exceptions
Ignoring exceptions
Using else
Cleaning up with finally
The standard exception hierarchy
Using Modules
What is a module?
The import statement
Where did the .pyc file come from?
Module search path
Zipped libraries
Creating Modules
Packages
Module aliases
When the batteries aren’t included
Regular Expressions
RE syntax overview
Regular expression metacharacters
RE Objects
Searching for patterns
Matching without re objects
Compilation flags
Grouping
Special groups
Replacing text
Replacing with a callback
Splitting a string
Using the Standard Library
The sys module
Interpreter information
STDIO
Launching external programs
Paths, directories, and filenames
Walking directory trees
Grabbing data from the web
Sending e-mail
Math functions
Random values
Dates and times
Zipped archives
An Introduction to Python Classes
About OO programming
Defining classes
Initializers
Instance methods
Properties
Class methods and data
Static methods
Private methods
Inheritance
Untangling the nomenclature
Bonus Exercises
Appendix A: Bibligraphy
Appendix B: Python Gotchas
Appendix C: Builtin Functions
What makes Python Essentials hard to master
Python's syntax is small, so the difficulty is rarely the grammar. It is learning to write Python the way it is meant to be written instead of translating habits from another language. The syllabus builds in a deliberate order.
- Core data and control flow. Variables and typing, the string types (single-quoted, triple-quoted, raw and Unicode literals), numeric expressions, and type conversion come first. Flow control follows, and indentation is the block structure, which the syllabus addresses directly in "What's with the white space?"
- Sequences, dictionaries and sets. This is where Python-specific idioms start: tuples, indexing and slicing,
enumerate(), list comprehensions and generator expressions. Counting with dictionaries and set operations follow. Learners from other languages often reach for index loops when a comprehension or slice is clearer. - Functions and sorting. Parameters, scope and global variables, then
sorted()with alternate keys, lambda functions andoperator.itemgetter(). Aliasing and scope rules are a common source of confusing bugs here, which is why the Python Gotchas appendix is worth reading closely. - Errors and modules.
try,else,finallyand the standard exception hierarchy, then imports, the module search path, packages and creating your own modules. - Regular expressions. Metacharacters, grouping, special groups, compilation flags, and replacement with a callback. This is usually the densest block, because the pattern language is a separate notation inside the language.
- Standard library and classes. External programs, directory walking, dates, archives, web data and e-mail, then an introduction to classes: initializers, properties, class and static methods, and inheritance.
Text versus binary data is another place to slow down. The syllabus covers Unicode literals alongside raw, non-delimited file data, and mixing the two is a classic source of errors.
Who it suits and where to go next
This four-day introductory course suits developers, administrators and technical staff who need to write working Python scripts. The prerequisites are user-level knowledge of Linux, Windows or macOS, and basic skill in at least one other programming language is desirable. It also suits training managers who want a team to share one practical baseline before automation or tooling work.
After this course, Intermediate Python 3.x is a natural step because it builds on the language fundamentals taught here. For teams whose work is tabular data, Python Data Analysis with NumPy and Pandas applies the sequence, dictionary and file-handling skills from this syllabus to larger data sets. Other options are listed on the Python Programming courses and learning guide.
Organizations that work with a particular Python release can ask for private training tailored to the versions they use. You can request a training proposal to discuss this.
Illustrative scenarios
The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.
- Report generation from text files. A team might read delimited log or export files with a
withblock, pull out fields using regular expression groups, count occurrences in dictionaries, and write a sorted summary usingsorted()with a lambda key oritemgetter(). - Administrative automation. An operations group might walk a directory tree, bundle old files into zipped archives, launch an external program, and send a status e-mail. Exception handling with
tryandfinallykeeps one bad file from stopping the whole run, and the same script has to cope with UNIX and Windows path conventions. - A shared utility module. A developer might move repeated parsing code into a module, organize related modules into a package, and wrap state and behavior in a small class with an initializer and properties, so colleagues can import it instead of copying scripts.
Using AI coding assistants with these topics
AI coding assistants are useful for drafting short scripts, first-pass regular expressions, file-reading loops and test inputs. They are fast at the boilerplate in this syllabus, such as opening files, building dictionaries and sorting by a key. They can also explain a traceback in terms of the exception hierarchy.
They fail in predictable places:
- Regular expressions. A generated pattern can match your sample line and still fail on others, especially with greedy matches, grouping mistakes or missing compilation flags.
- Text, bytes and paths. Encoding assumptions, empty input, and path handling that works on one operating system but not another are easy to miss in generated code.
- Exception handling. Assistants often add broad handlers that quietly ignore errors, which is the opposite of the careful handling taught in the exceptions block.
- Version fit. Suggested code may assume a different Python release than your environment, so idioms and library calls may not run as written.
To verify, run generated code in the interpreter on small, deliberately awkward inputs (empty files, odd characters, missing paths). Check each library call with pydoc, and review any script before it automates a business process. The course's emphasis on reading and writing the code yourself is what makes that review possible.
Frequently asked questions
What level is Python I: Essentials?
It is an introductory four-day, hands-on course. It starts with writing and running scripts and progresses to files, regular expressions, the standard library and an introduction to classes.
What do I need to know beforehand?
User-level familiarity with Linux, Windows or macOS. Basic skill in at least one other programming language is desirable but is not stated as a strict requirement.
Which topics does it cover?
Variables and strings, flow control, sequences (lists, tuples, slicing, comprehensions), file I/O, dictionaries and sets, functions, sorting, exception handling, modules and packages, regular expressions, selected standard library modules, and an introduction to classes.
Can this course be delivered privately for our team?
Yes. HSG provides private training for organizations, delivered onsite at your location or live online.
Can the content be customized?
Private course content can be customized, including tailoring to the Python version your organization uses. Use the training proposal request to describe your environment and goals.
Training locations
Python I: Essentials training across the U.S. and beyond.
We provide private Python I: Essentials training for organizations, onsite at your location or live online, throughout the United States and internationally.
View all Python I: Essentials training locations
Train your team with HSG
Private, instructor-led training customized for your organization.
- Onsite or live online delivery
- Customized curriculum
- For a single employee or an entire team
- Flexible scheduling
- Experienced instructors
Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com
Ready to train your team?
Let's customize this training for your organization.
Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.