List Comprehension - BEST Python feature !!! Fast and Efficient
In this tutorial, we will learn all about list comprehensions and how they can make our Python journey much easier and much more efficient!! ๐ค๐ค๐ค List comprehensions provide a shorter and faster alternative to "for" loops (especially when combined with conditional statements as well as append commands). And best of all - it takes only 1 LINE OF CODE! ๐ฑ This video offers 3 separate coding exercises, various examples and colorful illustrations of the concepts involved. Please feel free to use my code and artwork, you can find it in the link below: โญโญ clone my code: โญโญ ** Sorry code is unavailable, RIP Wayscript ๐ญ๐ญ๐ญ** And on a festive note... ๐HAPPY CANADA DAY!!!๐ to all my fellow Canadians! (and other Earth dwellers who celebrate ๐) Sending you lots of love from beautiful British Columbia! ๐๐๐ โฐ time stamps โฐ ____________________ 00:00 - intro 00:17 - what is a list comprehension? 01:22 - for loop vs list comprehension 02:40 - coding example 06:07 - conditional list comprehension 06:27 - coding example 2 09:02 - list comprehension on strings 09:29 - coding example 3 12:09 - else if list comprehension 13:50 - coming soon: dictionary comprehension 14:12 - thanks for watching! ๐๐ related tutorials of mine ๐๐ _____________________________________ - For Loops: https://youtu.be/dHANJ4l6fwA โก๏ธโก๏ธ starter code โฌ ๏ธโฌ ๏ธ __________________________ fruits = ["apples", "bananas", "strawberries"] for fruit in fruits: print(fruit) ๐ณ๐ณ credits ๐ณ๐ณ _______________________ - Beautiful Icons are by: https://www.flaticon.com/ - Beautiful Like/Share/Subscribe video graphics by: https://mixkit.co/ ๐ค connect with me ๐ค _______________________ - Github: https://github.com/MariyaSha - Discord: https://discord.gg/wgTTmsWmXA - LinkedIn: https://www.linkedin.com/in/mariyasha888/ - Twitter: https://twitter.com/MariyaSha888 - Blog: https://pythonsimplified.ca
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.