Python Tips, Tricks and Techniques

Video description

From first-class functions to abstract base classes, apply Pythonic tricks to your application and be a Python rockstar

About This Video

  • Take your programming skills to the next level in crucial areas of programming such as looping, data structures, and OOP. We show you 30 unique Python techniques containing hidden gems in Python PEPs, the standard library, and documentation.
  • Go from Python user to Python expert by learning tips and tricks gathered from StackOverflow, developer forums, and the Python source code.
  • Following a problem-solution format, each video makes it easy to understand tried and tested solutions to solve common problems, using unique Python tricks.

In Detail

You have been programming in Python for a while now. You know that Python is easy to get started with, but hard to get right. You want to write Pythonic code to make an impact in both the open source arena and your career.

This course is will take you from a Python outsider to an insider. You will benefit from insights from the Python documentation, PEPs, and online developer communities to learn the ultimate Pythonic ways to tackle common programming patterns. This course covers tips, tricks, and techniques for loops, data structures, object-oriented programming, functions, and more, helping you work on ordered collections and key-value stores for dictionaries. You will be able to increase the speed and performance of your code while making it easier to debug. Start writing cleaner code for your applications and learn to organize it better in just 3 hours.

No other course can transform every corner of your Python code. Take this course NOW and become an overnight Python rockstar developer.

This course uses Python 3.6, while not the latest version available, it provides relevant and informative content for legacy users of Python.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Working on Ordered Collections with Lists and List Comprehension
    1. The Course Overview 00:02:27
    2. Using List Comprehensions to Shorten for Loops 00:07:10
    3. Inserting if Statements Using Conditional List Comprehensions 00:04:55
    4. Operating on Lists of Lists with Nested List Comprehensions 00:05:34
    5. Simplify Your Collapsing Nested Lists 00:04:27
    6. List Slicing Tricks 00:05:37
  2. Chapter 2 : Creating Simple Key-value Stores with Python Dictionaries
    1. Never Get a KeyError Again with the defaultdict Data Structure 00:07:16
    2. Collapsing Nested Dictionaries to Simplify Your Code 00:06:07
    3. Mini Switch-case Statements with Dictionaries 00:05:11
    4. Merging Two Dictionaries with Just One line of Code 00:04:04
    5. Creating a Dictionary with List Comprehension in Python 00:03:20
  3. Chapter 3 : Speeding Up Your Code with High Performance Container Datatypes
    1. Counting Occurrences of Items Quickly with Counter 00:05:04
    2. Creating Stacks or Queues with Deque Objects 00:04:34
    3. Grouping Related Values with Tuples and Sequences 00:04:52
    4. Gathering Unique Sets of Values with Sets and Frozensets 00:04:15
    5. Powering Up Your Dictionaries with Ordered Dictionaries 00:04:33
  4. Chapter 4 : Making Your Code Easier to Debug With Functional Programming
    1. New Ways Of Calling Functions with Arguments and kwargs 00:07:24
    2. One Line Functions with Lambdas 00:05:33
    3. Segmenting Your Code with Functions within Functions 00:04:49
    4. Creating Dynamic Functions by Returning Functions 00:04:50
    5. Power Up Your Functions by Wrapping Them With Decorators 00:04:40
  5. Chapter 5 : Organizing Your Code Better with OOP and Classes
    1. Copying and Cloning Objects the Right Way 00:07:20
    2. Mini-Classes of Python- namedtuples 00:04:39
    3. Creating Smart Values with Static Methods and Properties 00:05:44
    4. Comparing Two Different Objects 00:04:21
    5. Do Real OOP by Implementing Abstract Base Classes in Python 00:04:17
  6. Chapter 6 : Creating Safer and Cleaner Applications with Pythonic Patterns
    1. Enumerating the Indices of Your Loops with No Extra Lines 00:05:51
    2. Underscore Useless Variables to Make Your Code Easier to Look at 00:06:03
    3. Uncommon “for..else” Loop to End Your Iteration 00:03:29
    4. Pretty Printing Any Python Data Structure 00:04:39
    5. Managing Your Dynamic Resources Carefully with Context Managers 00:05:05

Product information

  • Title: Python Tips, Tricks and Techniques
  • Author(s): Colibri Ltd
  • Release date: July 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789138535