Top 10 Python Language Concepts

This is a self-paced Global Knowledge Digital Learning product. GK Digital learning products are created by worldclass production and instructional design teams to deliver an experience that feels more like a classroom than traditional e-learning with hands-on activities for real-world results. In addition to high quality video content and hands-on labs you will have access to subject matter experts to ask questions for feedback and support.

Entry and mid-level developers are sometimes surprised by the behavior of code. Even more frequently, code is inefficient or doesn't respect the DRY (don't repeat yourself) principle. Topics in this course aim to help the developer understand what's going on “under the hood” and thereby write efficient, reusable code.

Writing efficient code helps to reduce resources consumed while your software is executing and enhances your user’s experience. By making code reusable, your development team can also develop faster.

Pre-Requisites

Students should already be comfortable with Python language fundamentals, including:

  • Writing and using classes, methods, and functions
  • Using container objects (e.g., list or dictionary)
  • Using decorators
  • Using string formatting
  • Using conditional operators

Content

  • Learning Outline
  • Pack and Unpack Parameters and Arguments
  • Leverage the Full Power of Dictionaries
  • Create Decorators to Add Functionality to Existing Functions
  • Write Modular Classes and Mixins with Multiple Inheritance
  • Create Properties to Implement Getters, Setters, and Deleters
  • Iterate over Iterators and Iterables
  • Create Generators to Implement Iterators
  • Use String Interpolation to Simplify Text Manipulation
  • Deal with runtime errors gracefully with exception handling
  • Write Pythonic code
  • GK Digital Learning Labs
  • Implement and call a complex function
  • Write a custom dictionary class
  • Create a decorator that encrypts and decrypts a function's arguments and return value
  • Create mixins to add functionality to a base class
  • Write a class that tracks temperature in Fahrenheit, Celsius, and Kelvin
  • Write an iterator that creates a sequence of numbers
  • Write a random sentence generator
  • Given a list of records (dicts or objects), print a nicely formatted report
  • Rewrite this code to use except6ion handling instead of conditionals to catch errors
  • Rewrite the nonidomatic parts of this code to be more Pythonic

Objectives

What You'll Learn
  • Take advantage of Python syntax to write simpler, more robust code
  • Modify the behavior of a functions and classes without touching existing code
  • Create custom iterators and generators and fully understand the concept of iteration
  • Understand Python’s class system and how to deal with multiple inheritance
  • Leverage the full range of dictionary functionality
  • Catch runtime errors effectively with exception handling
  • Develop an appreciation for idiomatic, “Pythonic” code

Target Audience

Mid-level to advanced software developers who have a firm grasp of language fundamentals but want to enhance their understanding of core technology concepts.