Skip to main content

Instructor-led training

Introduction to Python 3.x Training in Monroe, Ohio

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

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. Extra emphasis is placed on features unique to Python, such as tuples, array slices, and output formatting. This is a hands-on programming class. All concepts are reinforced by informal practice during the lecture followed by graduated lab exercises. Python Programming is a practical introduction to a working programming language, not an academic overview of syntax and grammar. Students will immediately be able to use Python to complete tasks in the real world.

Private Training for Teams

This course is offered as private, instructor-led training for organizations, onsite in Monroe, Ohio 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 Training

Course Outline

About this Course
Welcome
Classroom etiquette
Course outline
Student files
Extracting the student files
Examples
Lab exercises
Appendices
 
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
How to Get Python?
The end of 2.x
Getting Help
Pydoc
Using Pydoc
 
The Python Environment
Starting Python
If the Interpreter is Not in Your PATHs
Using the Interpreter
Trying Out a Few Commands
The help() Command
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-delimited String Literals
Triple-delimited String Literals
Raw String Literals
Unicode Characters
String Operators and Methods
Numeric Literals
Math Operators and Expressions
Converting Among Types
Writing to the Screen
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
Using Enumerate()
Functions for All Sequences
Keywords and Operators for All Sequences
The Range() 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
Non-Delimited (Raw) 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 a Dictionary
About Sets
Creating Sets
Working with Sets
 
Functions
Defning a Function
Function Parameters
Returning Values
Variable Scope
 
Sorting
Sorting
The Sorted() Function
Alternate Keys
Lambda Functions
Sorting Nested Data
\Sorting Dictionaries
Sorting in Reverse
Sorting Lists in Place
 
Using Modules
Regular Expressions
RE Syntax Overview
RE Objects
Searching for Patterns
Matching Without Re Objects
Compilation Fags
Grouping
Special Groups
Replacing Text
Splitting a String
 
Using the Standard Library
The Sys Module
Interpreter Information
STDIO
Launching External Programs
Paths, Directories, and Filenames
Walking Directory Trees
Grabbing Web Pages
Sending E-Mail
Math Functions
Random Values
Dates And Times
Zipped Archives
 
An Introduction to Python Classes
About O-O Programming
Defining Classes
Initializers
Instance Methods
Properties
Class Methods and Data
Static Methods
Private Methods
Inheritance
Untangling the Nomenclature
 
Bonus Exercises
Appendix A: Bibliography
Appendix B: Python Gotchas
Appendix C: String Formatting

What makes this material hard to master

The syntax is small. The difficulty is thinking in Python's own idioms instead of translating code from another language. The syllabus builds toward that in layers.

  • Core types and whitespace. Variables, dynamic typing, strings (single, triple-delimited, raw and Unicode literals), numeric conversion and string formatting come first. Flow control follows, where indentation is the block structure.
  • Sequences. Lists, tuples, indexing and slicing, enumerate(), range(), nested sequences, list comprehensions and generator expressions. Slicing and comprehensions are the features most unlike C-family languages, and learners often write index-based loops instead. The course description calls out tuples, slices and output formatting as Python-specific.
  • Dictionaries and sets. Counting with a dictionary, reading file data into one, and set operations. Choosing the right structure matters more than knowing the method names.
  • Functions, sorting and lambdas. Parameters, return values and variable scope lead into sorted(), alternate sort keys, lambda functions and sorting nested data. Scope rules and how parameters are passed are a common source of surprises, so watch them in the labs.
  • Regular expressions. Pattern syntax, groups, special groups, substitution and splitting. The notation is dense, and most errors come from patterns that match more or less than intended.
  • Standard library and classes. sys, launching external programs, directory walking, dates and times, zipped archives, and then initializers, properties, class and static methods, and inheritance.

A common misconception is that a short course on the basics means shallow scripts. The later topics, such as file handling with the with block, regular expressions and library use, are what let people automate real tasks, and they depend on the earlier material being solid.

Who it suits and what to take next

This is an introductory, hands-on course. The syllabus starts with what Python is, how to run the interpreter and scripts, and how to use variables, so it suits people who are new to Python, whether or not they have programmed before. Typical audiences are administrators, analysts, testers and developers who need to automate tasks, process text and files, or read and maintain existing scripts. Teams that maintain older code will also meet the syllabus topic on the end of Python 2.x, which is relevant when scripts written for Python 2.x need to be understood or migrated. Python 2.x support ended in January 2020.

After this course, Intermediate Python 3.x is a natural next step if you want to go further than the object-oriented introduction and the standard-library tour here. If your work is mostly tabular data, Python Data Analysis with NumPy and Pandas builds on the basics of sequences, dictionaries and file input and output. The Python Programming courses and learning guide shows other routes.

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.

  • Log and report processing. A support team might read text files with a with block, pull out fields using regular expression groups, tally results in a dictionary, and write a sorted summary using sorted() with a lambda key.
  • File housekeeping. An operations group might walk a directory tree, filter files by name and date, bundle them into a zipped archive and send a notification e-mail, using the path, directory, date and time, archive and e-mail topics from the standard-library section.
  • Reusable utilities. A developer might package a repeated task as a small class with an initializer, properties and a couple of methods, so colleagues can import it instead of copying a script.

Using AI coding assistants with these topics

AI coding assistants are useful for drafting short scripts, first-pass regular expressions, sort keys and boilerplate for classes. They are also good at explaining unfamiliar code. For a beginner this speeds up experiments, but it can hide gaps: if you cannot read a comprehension or slice, you cannot judge whether the generated version is right.

They tend to fail on details. Regular expressions often look right and break on empty input, unusual whitespace or multiline text. Generated file code may ignore character encoding, a missing file or an empty file. Path handling may assume one operating system. Code that launches external programs or sends e-mail needs close review before it touches real systems. Assistants may also produce Python 2-style idioms or mix styles.

To verify, run the code on small inputs you can check by hand, including empty and malformed ones. Print intermediate values, and test regular expressions against both matching and non-matching examples. Read every line you will automate, and confirm that sorting, counting and slicing behave as you expect. The practice in this course on reading and writing these constructs is what makes that review possible.

Frequently asked questions

What level is this course?

It is introductory. It starts with running the interpreter and scripts, variables and strings, and progresses over four days to files, regular expressions, standard-library modules and an introduction to classes.

Are there prerequisites?

None are stated for this course. The syllabus begins with the basics of Python and its environment. Prior programming experience in any language is likely to help with pacing.

What does the course cover?

Variables and strings, flow control, lists and tuples with slicing and comprehensions, text file input and output, dictionaries and sets, functions, sorting, regular expressions, selected standard-library modules (such as sys, directory walking, dates and times, and zip archives) and basic object-oriented programming. Labs reinforce each topic.

Can this be delivered privately onsite or online?

Yes. HSG provides private training for organizations, delivered at your location or live online.

Can the course be customized?

Private training can be tailored to your team's needs and to the Python versions your organization uses, including current releases. You can request a training proposal to discuss it.

Training locations

Introduction to Python 3.x training across the U.S. and beyond.

We provide private Introduction to Python 3.x training for organizations, onsite at your location or live online, throughout the United States and internationally.

View all Introduction to Python 3.x 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
Request Group Training

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.