Python comprehensions are a very natural and easy way to create lists, dicts, and sets. They are also a great alternative to using maps and filters within python. If you are using maps, filters, or for loops to create your lists, then most likely you could and should be using comprehensions instead.
In this video, we will look at how comprehensions work, why you should be using them, and the benefits they have over the alternatives.
The code from this video can be found at:
If you enjoy these videos and would like to support my channel, I would greatly appreciate any assistance through my Patreon account:
Or a one-time contribution through PayPal:
If you would like to see additional ways in which you can support the channel, you can check out my support page:
Equipment I use and books I recommend:
You can find me on:
My website - http://coreyms.com/
Facebook - https://www.facebook.com/CoreyMSchafer
Twitter - https://twitter.com/CoreyMSchafer
Google Plus - https://plus.google.com/+CoreySchafer44/posts
Instagram - https://www.instagram.com/coreymschafer/