Companies Home Search Profile

Using List Comprehensions Effectively

Focused View

Dan Bader

13:45

141 View
  • 01 List Comprehensions part1.mp4
    00:43
  • 01 List Comprehensions part2.mp4
    01:57
  • 01 List Comprehensions part3.mp4
    02:51
  • 01 List Comprehensions part4.mp4
    01:49
  • 01 List Comprehensions part5.mp4
    00:49
  • 01 List Comprehensions part6.mp4
    01:02
  • 01 List Comprehensions part7.mp4
    02:20
  • 01 List Comprehensions part8.mp4
    02:14
  • Description


    This short course breaks down Python list comprehensions for you step by step. See how Python’s comprehensions can be transformed from and to equivalent “for”-loops so you’ll know exactly what’s going on behind the scenes.

    One of my favorite features in Python are list comprehensions. They can seem a bit arcane at first but when you break them down they are actually a very simple construct.

    The key to understanding Python’s list comprehensions is that they’re just for-loops over a collection expressed in a more terse and compact syntax.

    In the course you’ll also learn when to use list comprehensions in your own Python programs and when not to. Basically, the caveat to Python’s comprehensions is this—as you get more proficient at using them it becomes easier and easier to write code that’s difficult to read.

    If you’re not careful you might have to deal with monstrous list, set, dict comprehensions soon. Too much of a good thing is usually a bad thing.

    What You'll Learn?


    • Comprehending Python’s Comprehensions

    More details


    User Reviews
    Rating
    0
    0
    0
    0
    0
    average 0
    Total votes0
    Focused display
    Category

    Dan Bader is the owner and editor in chief of Real Python and the main developer of the realpython.com learning platform. Dan has been writing code for more than 20 years and holds a master’s degree in computer science. He’s the author of Python Tricks, a best selling programming book for intermediate Python developers.

    Hey, I’m Dan Bader and I help Python developers take their coding skills and productivity to the next level. I’m an independent software engineer, author, and speaker. I’ve been writing code for more than two decades—and I’d love to help you become a more proficient Python coder.

    Here’s where you can find me elsewhere on the web:

    I’ve also done some podcast interviews and other media appearances you can check out:

    Learn Python online: Python tutorials for developers of all skill levels, Python books and courses, Python news, code examples, articles, and more.
    • language english
    • Training sessions 8
    • duration 13:45
    • Release Date 2023/01/05