Python Tutorial: Comprehensions - How they work and why you should be using them

Published: 24 August 2015
on channel: Corey Schafer
530,738
13k

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:
https://github.com/CoreyMSchafer/code...


✅ Support My Channel Through Patreon:
  / coreyms  

✅ Become a Channel Member:
   / @coreyms  

✅ One-Time Contribution Through PayPal:
https://goo.gl/649HFY

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist
http://a.co/inIyro1

✅ Equipment I Use and Books I Recommend:
https://www.amazon.com/shop/coreyschafer

▶️ You Can Find Me On:
My Website - http://coreyms.com/
My Second Channel -    / coreymschafer  
Facebook -   / coreymschafer  
Twitter -   / coreymschafer  
Instagram -   / coreymschafer  

#Python


Watch video Python Tutorial: Comprehensions - How they work and why you should be using them online, duration hours minute second in high quality that is uploaded to the channel Corey Schafer 24 August 2015. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 530,738 times and liked it 13 thousand visitors.