Modern Python Solutions Part 1
1.5 (1 rating)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
16 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Modern Python Solutions Part 1 to your Wishlist.

Add to Wishlist

Modern Python Solutions Part 1

The latest in modern Python recipes for the busy modern programmer covering the essential fundamentals of Python Program
1.5 (1 rating)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
16 students enrolled
Created by Packt Publishing
Last updated 2/2017
Current price: $10 Original price: $125 Discount: 92% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • See the intricate details of the Python syntax and how to use it to your advantage
  • Improve your code readability through functions in Python
  • Manipulate data effectively using built-in data structures
  • Get acquainted with advanced programming techniques in Python
  • Equip yourself with functional and statistical programming features
  • Write proper tests to be sure a program works as advertised
  • Integrate application software using Python
View Curriculum
  • This course is targeted at beginners who want to get started with Python and developers who want to expand the basic knowledge on Python. Prior knowledge of programming languages like C, C++, and Java is preferable.
  • The software requirements for the course are:
  • Python 3.5
  • Windows OS
  • Any good text editor

Python is the preferred choice of developers, engineers, data scientists, and hobbyists everywhere. It is a great scripting language that can power your applications and provide great speed, safety, and scalability. By exposing Python as a series of simple recipes, you can gain insight into specific language features in a particular context. Having a tangible context helps make the language or standard library feature easier to understand.This video comes with over 100 recipes on the latest version of Python. The recipes will benefit everyone ranging from beginner to an expert. The video is broken down into 13 sections that build from simple language concepts to more complex applications of the language.The recipes will touch upon all the necessary Python concepts related to data structures, OOP, functional programming, as well as statistical programming. You will get acquainted with the nuances of Python syntax and how to effectively use the advantages that it offers. You will end the book equipped with the knowledge of testing, web services, and configuration and application integration tips and tricks.The recipes take a problem-solution approach to resolve issues commonly faced by Python programmers across the globe. You will be armed with the knowledge of creating applications with flexible logging, powerful configuration, and command-line options, automated unit tests, and good documentation.

About The Author

Steven F. Lott has been programming since the 70s, when computers were large, expensive, and rare. As a contract software developer and architect, he has worked on hundreds of projects, from very small to very large. He's been using Python to solve business problems for over 10 years.

He’s currently leveraging Python to implement microservices and ETL pipelines. His other titles with Packt Publishing include Python Essentials, Mastering Object-Oriented Python, Functional Python Programming, and Python for Secret Agents.

Steven is currently a technomad who lives in various places on the east coast of the U.S.

Who is the target audience?
  • The video is for web developers, programmers, enterprise programmers, engineers, big data scientist, and so on. If you are a beginner, Modern Python Recipes will get you started. If you are experienced, it will expand your knowledge base. A basic knowledge of programming would help.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
52 Lectures
Numbers, Strings, and Tuples
13 Lectures 01:22:08

This video will provide you with an overview of the course.

Preview 03:22

Choosing the correct name is essential to make our programs more readable and ease the process of designing software and applications. Complex names could lead to confusion. This video will guide you to select the appropriate names while designing an application.

Creating Meaningful Names and Using Variables

Many programming languages make a distinction between integers, bytes, and long integers. Some languages include distinctions for signed versus unsigned integers. How do we map these concepts to Python? This video will walk you through these concepts in detail.

Working with Large and Small Integers

Python offers us several ways to work with rational numbers and approximations of irrational numbers. We have three basic choices, which are Float, Decimal, and Fraction. With so many choices, when do we use each of these? This video will let you answer this question.

Choosing between Float, Decimal, and Fraction

This video will let you understand which division operator to use while converting numbers from one base to another

Choosing between True Division and Floor Division

How can we rewrite an immutable string? This video will answer this question and show you how to work with strings in Python.

Rewriting an Immutable String

The easiest way to decompose a complex string is by generalizing the string into a pattern and then writing a regular expression that describes that pattern.This video will let you know how to do it in a smart way!

String Parsing with Regular Expressions

Creating complex strings is, in many ways, the polar opposite of parsing a complex string. Let’s dive into building a complex string.

Building Complex Strings with “template”.format()

There’s another way of building complex strings, which is, from a list of characters. This video will walk you through the steps that let you build a complex string from a list of characters.

Building Complex Strings from Lists of Characters

Our Computers work a lot with Unicode, and sometimes, we are not aware how to use them. This video will let you know how to use Unicode and the internal operations on them.

Using the Unicode Characters that aren't on Our Keyboards

How do we map Unicode characters to bytes for writing to a file or transmitting? This video will show you, how to achieve this goal.

Encoding Strings-Creating ASCII and UTF8 Bytes

How can we work with files that aren't properly encoded? What do we do with files written in the ASCII encoding? How do we decode the characters from that stream of bytes? This video will answer all these queries.

Decoding Bytes, How to Get Proper Characters from Some Bytes

How can we keep things, which are pairs, such as latitude and longitude, together? Let’s see how to do this!

Using Tuples of Items
Statements and Syntax
11 Lectures 56:13

You need to write Python script files in order to do anything truly useful. How can we avoid syntax errors and be sure that our code matches what's in common use? This video will provide a resolution for these tasks.

Preview 07:48

There are many times when we need to write lines of code that are so long that they're very hard to read. How can we break long Python statements into more manageable pieces? Let’s explore this.

Writing Long Lines of Code

When we have a useful script, we often need to leave notes for ourselves and others, on what it does, how it solves some particular problem, and when it should be used. This video contains a suggested outline so that the documentation will be reasonably complete.

Including Descriptions and Documentation

When we have a useful script, we often need to leave notes on what it does, how it works, and when it should be used. Many tools for producing documentation, including Docutils, work with RST markup. What RST features can we use to make our documentation more readable? Let’s dive into it!

Writing Better RST Markup in docstring

When designing a complex chain of if and else statements, we might miss some condition that got lost in the tangle of logic. Missing this will mean that our program will fail to work properly. How can we be sure we haven't missed something? This video is an answer to this question.

Designing Complex if…elif Chains

There are a few situations, where we don't have the data until we get an input from the person. Let’s have a look at how we could implement a while statement in these conditions.

Designing a While Statement that Terminates Properly

What could you do when you have multiple break statements, each with its own condition. How can you minimize the problems created by having complex break conditions? Let’s get the answer for these questions.

Avoiding a Potential Problem with Break Statements

How could we avoid confusion due to hierarchy if we're trying to handle detailed exceptions as well as generic exceptions? This video will give a few of the best exception matching rules.

Leveraging the Exception Matching Rules

There are some common mistakes in exception handling. These can cause programs to become unresponsive. This video will show some common exception handling errors that we can avoid.

Avoiding a Potential Problem With an Except:Clause

In some cases, we may want to merge some seemingly unrelated exceptions into a single generic exception. What if we need to provide supporting details that amplify or extend the generic exception. We can do this by chaining from the generic exception to the root cause exception. Let’s see how to do this.

Chaining Exceptions with the Raise from Statement

There are many instances where our scripts will be entangled with external resources. We'd like to isolate each entanglement so that we can be sure that the resource is acquired and released properly. Let’s see how we could achieve this goal.

Managing a Context Using the With Statement
Function Definitions
8 Lectures 44:44

When we define a function, we often have a need for optional parameters. This allows us to write functions that are more flexible, and can be used in more situations. Let’s see how to design these functions.

Preview 11:02

In some cases, we want to provide a simple, high-performance software implementation that can perform different calculations based on what's known and what's unknown. We don't want to use a general algebraic framework; we want to bundle the different solutions into a simple, efficient function. This video will demonstrate how you could do this.

Using Super Flexible Keyword Parameter

What if you have a large number of positional parameters to a function? What would you do when it gets difficult to remember the required order for the parameters and there are too many parameters? Let’s answer these questions.

Forcing Keyword-only Argument with the * Separator

Sometimes we want hints about the type of data involved, which can be used for testing and confirmation but don't interfere with performance. How can we provide meaningful type hints? Let’s see how we could achieve this goal.

Writing Explicit Types on Function Parameters

What could be done if we’d like to provide a way to make the common parameters slightly easier to work with than the uncommon parameters and to avoid having to repeat the parameters that are part of a larger context? Let’s have a resolution to this situation.

Picking an Order for Parameters Based on Partial Functions

How can we clearly document what a function does? Can we provide examples? Let’s explore the answers to these questions.

Writing Clear Documentation Strings

Let’s see how we could use a simple and smart way to design recursive functions to enhance the structure of our program.

Designing Recursive Functions Around Python’s Stack Limit

How can we import the functions or classes from a file without having the script start doing something? Let’s see how to do this.

Writing Reusable Script with the Script Library Switch
Built-in Data Structures – List, Sets, and Dict
14 Lectures 01:23:20

How do we choose which structure to use? What are the features of lists, sets, and dictionaries? Why do we have tuples and frozen sets? Let’s answer these questions with this video.

Preview 09:38

This video will show you a number of ways through which we can build a list object from individual items.

Building Lists – Literals, Appending, and Comprehensions

There are many times when we want to pick items from a list. One of the most common kinds of processing is to treat the first item of a list as a special case. This leads to a kind of head-tail processing where we treat the head of a list differently from the items in the tail of a list. Let’s see how we can slice or dice a list.

Slicing And Dicing a List

There are many times when we want to remove items from a list collection. We might delete items from a list, and then process the items that are left over. Let’s see how to do this.

Deleting From a List

We generally want to display the values with the most significant digit first. This leads to a need of reversing the sequence of digits in a list. This video will let you do this in Python.

Reversing a Copy of a List

This video will show you the efficient use of set methods and operators to enhance the performance of your Python Programs.

Using Set Methods and Operators

Python gives us several ways to remove items from a set collection. Let’s dive into few of these.

Removing Items from a Set

Through this video, you will be able to use a dictionary when you have some key that we need to map to a given value along with some key operations like inserting and updating dictionaries.

Creating Dictionaries

This video will show you how to define a service that works in a simulated environment with a single processing thread and avoid concurrency and multi-processing considerations.

Removing from Dictionaries

What if we want to keep the keys in a given order so that the dictionary follows the structure of the source file? Let’s see how we could do this.

Controlling the Order of the Dict Keys

How can we be sure our doctest examples really work? Let’s get the answer to this.

Handling Dictionaries and Sets in doctest Examples

How do variables really work? What happens when we assign a mutable object to two variables? Let’s have the answer to these questions.

Understanding Variables, References, and Assignment

This video will walk you through different ways to break the connection that exists when two variables are references to the same underlying object

Making Shallow and Deep Copies of Objects

This video will let you have a close look at the consequences of a mutable default value for a function parameter and how to avoid it.

Avoiding Mutable Default Values for Function Parameters
User Inputs and Outputs
6 Lectures 37:20

Can we control the formatting in our programs? Can we change the extra characters that are supplied? Let’s see how to do this.

Preview 07:25

Some Python scripts depend on gathering the input from a user. There are several ways to do this. Let’s explore a few of them.

Using input() and getpass() for User Input

There are some kinds of formatting options available in Python. What if we want more flexible output? Let’s see some amazing options for this, which are there for you in Python.

Debugging with “Format”.Format_Map(Vars())

In some cases, we may want to get the user input from the OS command line without a lot of interaction. We'd prefer to parse the command-line argument values and either perform the processing or report an error. How do we parse argument values from the command line? Let’s start doing this with this video.

Using Argparse to Get Command-line Input

There are several ways of creating interactive applications. Let’s see how we can prompt the user for input and then invoke a specific method of the class we provide.

Using CMD for Creating Command-line Applications

The environment variables are available through the os module. How can we have an application's configuration based on these OS-level settings? Let’s have a close look at this.

Using the OS Environment Settings
About the Instructor
Packt Publishing
3.9 Average rating
7,264 Reviews
51,806 Students
616 Courses
Tech Knowledge in Motion

Packt has been committed to developer learning since 2004. A lot has changed in software since then - but Packt has remained responsive to these changes, continuing to look forward at the trends and tools defining the way we work and live. And how to put them to work.

With an extensive library of content - more than 4000 books and video courses -Packt's mission is to help developers stay relevant in a rapidly changing world. From new web frameworks and programming languages, to cutting edge data analytics, and DevOps, Packt takes software professionals in every field to what's important to them now.

From skills that will help you to develop and future proof your career to immediate solutions to every day tech challenges, Packt is a go-to resource to make you a better, smarter developer.

Packt Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.