Overview

This is a technical course that introduces the Python 3 programming language. It is an instructor led presentation and hands on exercises course using MS Windows, but is equally applicable to other platforms such as Linux.

Target Audience

This course is suitable for programmers starting new projects in Python 3, or for those porting existing applications from Python 2.

Read more +

Prerequisites

No previous knowledge of Python is assumed, although delegates should be familiar with at least one programming language.

Experience of another scripting language, such as Perl or PHP, will be an advantage, as will previous experience of object oriented programming.

Read more +

Learning Outcomes

At the end of this course you will be able to:

  • Use the Python interactive interpreter to write and run Python 3 programs
  • Understand Python 3 language elements
  • Exploit the rich library of Python libraries and modules
  • Appreciate the differences between Python 2 and Python 3
  • Recognize simple and complex variable types and select appropriately
  • Use Python 3 operators and built-in functions
  • Understand procedural control flow in Python 3
  • Program file input/output, including persistent data objects.
  • Create well organized and efficient code using functions and modules
  • Use Object Oriented programming techniques in Python 3.
  • Build robust applications with error trapping and reporting
  • Run and control other programs from Python
  • Take advantage of multi-core processors with multiprocessing
Read more +

Course Outline

Chapter 1: Introduction to Python 3

  • What is Python?
  • What is Python 3?
  • Why Python?
  • Performance downsides
  • The community
  • Running Python interactively
  • Python scripts
  • Python help
  • Anatomy of a Python script
  • Modules
  • Functions and built-ins

Chapter 2: Fundamental Variables

  • Python is Object Oriented
  • Python variables
  • Variable names
  • Type specific methods
  • Operators and type
  • Augmented assignments
  • Python types
  • Switching types
  • Python lists introduced
  • Python tuples introduced
  • Python dictionaries introduced

Chapter 3: Flow Control

  • Python conditionals
  • Indentation
  • What is truth?
  • Boolean and logical operators
  • Chained comparisons
  • Sequence and collection tests
  • Object types
  • A note on Exception Handling
  • While loops
  • Loop control statements
  • For loops
  • enumerate
  • Counting 'for' loops
  • Zipping through multiple lists
  • Conditional expressions
  • Unconditional flow control

Chapter 4: String Handling

  • Python 3 strings
  • The print function
  • Cooking strings
  • String concatenation
  • 'Quotes'
  • String methods
  • String tests
  • String formatting
  • Other string formatting aids
  • Slicing a string
  • String methods - split and join

Chapter 5: Collections

  • Python types - reminder
  • Useful tuple operations
  • Python lists
  • Tuple and list slicing
  • Extended iterable unpacking
  • Adding items to a list
  • Removing items by position
  • Removing list items by content
  • Sorting
  • List methods
  • Sets
  • Exploiting sets
  • Set operators
  • Python dictionaries
  • Dictionary values
  • Removing items from a dictionary
  • Dictionary methods
  • View objects

Chapter 6: Regular Expressions

  • Python regular expressions
  • Elementary extended RE meta-characters
  • Regular expression objects
  • Regular expression substitution
  • Regular expression split
  • Matching alternatives
  • Anchors
  • Class shortcuts
  • Flags
  • Repeat quantifiers
  • Quantifiers
  • Parentheses groups
  • Back-references
  • Global matches

Chapter 7: Data Storage and File Handling

  • New file objects
  • Reading files into Python
  • Reading tricks
  • Filter programs - fileinput module
  • Binary mode
  • Writing to files from Python
  • Standard streams
  • More tricks
  • Random access
  • Python pickle persistence
  • Pickle protocols
  • Build some shelves
  • Compression
  • Database interface overview
  • Example - SQLite from Python

Chapter 8: Functions

  • Python functions
  • Function parameters
  • Variadic functions
  • Assigning default values to parameters
  • Named (keyword) parameters
  • Enforcing named parameters
  • Returning objects from a function
  • Variables in functions
  • Nested functions
  • Variables in nested functions
  • Function documentation
  • Lamdba functions
  • Lambda as a sort key
  • Lambda in re.sub

Chapter 9: Advanced Collections

  • Advanced list functions - filter
  • List comprehensions
  • Set and dictionary comprehensions
  • Lazy lists
  • Generators
  • Generator objects and next - coroutines
  • List comprehensions as generators
  • Copying collections - problem
  • Copying collections - slice solution?
  • Copying collections - deepcopy solution

Chapter 10: Modules and Packages

  • What are modules and packages?
  • Multiple source files
  • How does Python find a module?
  • Importing a module
  • Importing names
  • Directories as packages
  • Writing a module
  • Module documentation
  • Testing a module
  • Python debugger
  • Python profiler
  • Distributing libraries - distutils

Chapter 11: Introduction to Classes and OOP

  • Classes and OOP
  • Object-Oriented terminology
  • Object-Oriented Programming
  • Using objects
  • Defining classes
  • Defining methods
  • Constructing an object
  • Special methods
  • Operator overload special methods
  • Properties
  • Properties and decorators
  • Class methods
  • Inheritance
  • Inheritance terminology

Chapter 12: Error Handling and Exceptions

  • Writing to stderr
  • Controlling warnings
  • Exception handling
  • Exception syntax
  • Multiple exceptions
  • Exception arguments
  • The finally block
  • Order of execution
  • The Python exception hierarchy
  • A common mistake
  • The raise statement
  • Raising our own Exceptions
  • assert

Chapter 13: Multitasking

  • Family life
  • Creating a process from Python
  • Old interface examples
  • Waiting for a child
  • Using the subprocess module
  • The subprocess.Popen class
  • Running a basic process
  • Capturing the output
  • Passing data through a pipe
  • Processes and threads
  • Very basic threads in Python
  • Synchronization objects in threading
  • The trouble with threads
  • Using the multiprocessing module
  • Queue objects

Chapter 14: The Python Standard Library

  • The Standard Library
  • Example - converting Python 2 scripts to Py3
  • Pretty Printer - a useful utility
  • Operating System interfaces - os and friends
  • System specific attributes - sys
  • Signal handling - signal
  • Converting a signal to an exception
  • Configuration files
  • The configparser module
  • The datetime module and friends
  • The platform module
  • External function interface - ctypes
  • The socket module
  • __future__
  • Other modules
Read more +

Why choose QA

Special Notices

Please note: for Attend from Anywhere customers an additional screen is required.

The additional screen must have a minimum screen size of 19 inches and minimum resolution of 1280x1024, with the vertical resolution (1024) being the most critical.

Need to know

Frequently asked questions

How can I create an account on myQA.com?

There are a number of ways to create an account. If you are a self-funder, simply select the "Create account" option on the login page.

If you have been booked onto a course by your company, you will receive a confirmation email. From this email, select "Sign into myQA" and you will be taken to the "Create account" page. Complete all of the details and select "Create account".

If you have the booking number you can also go here and select the "I have a booking number" option. Enter the booking reference and your surname. If the details match, you will be taken to the "Create account" page from where you can enter your details and confirm your account.

Find more answers to frequently asked questions in our FAQs: Bookings & Cancellations page.

How do QA’s virtual classroom courses work?

Our virtual classroom courses allow you to access award-winning classroom training, without leaving your home or office. Our learning professionals are specially trained on how to interact with remote attendees and our remote labs ensure all participants can take part in hands-on exercises wherever they are.

We use the WebEx video conferencing platform by Cisco. Before you book, check that you meet the WebEx system requirements and run a test meeting (more details in the link below) to ensure the software is compatible with your firewall settings. If it doesn’t work, try adjusting your settings or contact your IT department about permitting the website.

How do QA’s online courses work?

QA online courses, also commonly known as distance learning courses or elearning courses, take the form of interactive software designed for individual learning, but you will also have access to full support from our subject-matter experts for the duration of your course. When you book a QA online learning course you will receive immediate access to it through our e-learning platform and you can start to learn straight away, from any compatible device. Access to the online learning platform is valid for one year from the booking date.

All courses are built around case studies and presented in an engaging format, which includes storytelling elements, video, audio and humour. Every case study is supported by sample documents and a collection of Knowledge Nuggets that provide more in-depth detail on the wider processes.

When will I receive my joining instructions?

Joining instructions for QA courses are sent two weeks prior to the course start date, or immediately if the booking is confirmed within this timeframe. For course bookings made via QA but delivered by a third-party supplier, joining instructions are sent to attendees prior to the training course, but timescales vary depending on each supplier’s terms. Read more FAQs.

When will I receive my certificate?

Certificates of Achievement are issued at the end the course, either as a hard copy or via email. Read more here.

Let's talk

By submitting this form, you agree to QA processing your data in accordance with our Privacy Policy and Terms & Conditions. You can unsubscribe at any time by clicking the link in our emails or contacting us directly.