Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Python by Example
Rating: 4.0 out of 5(16 ratings)
186 students

Python by Example

From Beginner to Professional
Last updated 5/2016
English

What you'll learn

  • Know the basics of Python
  • Take an abbreviated tour of the standard library
  • Learn intermediate topics (lambda, decorators, code profiling, testing)
  • Install 3rd Party modules / packages
  • Tutorials using SQLAlchemy, virtualenv, lxml, pylint, and more

Course content

4 sections35 lectures6h 43m total length
  • IDLE8:29

    Learn how to use Python's included code editor, IDLE. You will learn the following:

    • How to use IDLE's interpreter interface
    • What the Path Browser is
    • What the Class Browser is used for
    • How to configure IDLE
    • What Code Context is for
    • and more!
  • Strings14:29

    There are several data types in Python. The main data types that you'll probably see the most are string, integer, float, list, dict and tuple. In this episode, we'll cover the string data type. You'll be surprised how many things you can do with strings in Python right out of the box. There's also a string module that you can import to access even more functionality, but we won't be looking at that in this lecture. Instead, we will be covering the following topics:

    • How to create strings
    • String concatenation
    • String methods
    • String slicing
    • String substitution
  • Lists, Tuples and Dictionaries12:29

    Python has several other important data types that you'll probably use every day. They are called lists, tuples and dictionaries. This lecture's aim is to get you acquainted with each of these data types. They are not particularly complicated, so I expect that you will find learning how to use them very straight forward. Once you have mastered these three data types plus the string data type from the previous lecture, you will be quite a ways along in your education of Python. You'll be using these four building blocks in 99% of all the applications you will write.

  • Conditional Statements18:16

    Every computer language I have ever used has had at least one conditional statement. Most of the time that statement is the if/elif/else structure. This is what Python has. Other languages also include the case/switch statement which I personally enjoy, however Python does not include it. You can make your own if you really want to, but this lecture series is focused on learning Python fundamentals, so we're going to be only focusing on what's included with Python in this chapter.

    The conditional statement checks to see if a statement is True or False. That's really all it does. However we will also be looking at the following Boolean operations: and, or, and not. These operations can change the behavior of the conditional in simple and complex ways, depending on your project.

  • Loops12:38

    Every programming language I have tried has some kind of looping construct. Most have more than one. The Python world has two types of loops:

    • the for loop and
    • the while loop

    You will find that the for loop is by far the most popular of the two. Loops are used when you want to do something many times. Usually you will find that you need to do some operation or a set of operations on a piece of data over and over. This is where loops come in. They make it really easy to apply this sort of logic to your data.

  • Comprehensions11:06

    The Python language has a couple of methods for creating lists and dictionaries that are known as comprehensions. There is also a third type of comprehension for creating a Python set. In this lecture we will learn how to use each type of comprehension. You will find that the comprehension constructs build on the knowledge you have acquired from the previous lectures as they contain loops and conditionals themselves.

  • Exception Handling9:09

    What do you do when something bad happens in your program? Let's say you try to open a file, but you typed in the wrong path or you ask the user for information and they type in some garbage. You don't want your program to crash, so you implement exception handling. In Python, the construct is usually wrapped in what is know as a try/except. We will be looking at the following topics in this lecture:

    • Common exception types
    • Handling exceptions with try/except
    • Learn how try/except/finally works
    • Discover how the else statement works in conjunction with the try/except
  • File I/O16:50

    This lecture introduces the topic of reading and writing data to files on your hard drive.

  • Imports6:47

    Python comes with lots of pre-made code baked in. These pieces of code are known as modules and packages. A module is a single importable Python file whereas a package is made up of two or more modules. A package can be imported the same way a module is. Whenever you save a Python script of your own, you have created a module. It may not be a very useful module, but that's what it is. In this lecture, we will learn how to import modules using several different methods.

  • Functions13:23

    A function is a structure that you define. You get to decide if they have arguments or not. You can add keyword arguments and default arguments too. A function is a block of code that starts with the def keyword, a name for the function and a colon. It's really easier to just show you an example, so I recommend watching the lecture!

  • Classes13:21

    Everything in Python is an object. That's a very vague statement unless you've taken a computer programming class or two. What this means is that every thing in Python has methods and values. The reason is that everything is based on a class. A class is the blueprint of an object.

  • Python Introspection5:30

    Whether you're new to Python, been using it for a few years or you're an expert, knowing how to use Python's introspection capabilities can help your understanding of your code and that new package you just downloaded with the crappy documentation. Introspection is a fancy word that means to observe oneself and ponder one's thoughts, senses, and desires. In Python world, introspection is actually kind of similar. Introspection in this case is to use Python to figure out Python.

Requirements

  • Download Python 3 if your OS doesn't already have it pre-installed

Description

Python By Example will help you learn the Python programming language from the ground up. We will be using Python 3 in this course. It is currently split into four parts. In part one, you will learn how the basic building blocks of Python, such as strings, lists, dictionaries and tuples. You will also learn how to handle exceptions, create list comprehensions, make functions, classes, etc. 

In part two, we take an abbreviated tour of the Python Standard Library. This set of screencasts cover handpicked modules from the library that I have found useful in my every day programming life.

For part three, we move into intermediate level material such as lambdas, decorators, debugging, profiling and testing.

Finally in part four we jump into 3rd party modules and packages. In this section, you will learn how to install these modules from the Python Package Index (PyPI) as well as how to use some of these modules. For example, you will learn how to use SQLAlchemy, virtualenv and pylint among others.

I hope this has piqued your interest. I am looking forward to helping you learn Python too!

Who this course is for:

  • You will get the most out of this course if you have some programming experience
  • This course is aimed at beginners or intermediate users of Python