List Comprehensions | Set Comprehension | Dict Comprehension | Python Tutorials Ep. 32
ฝัง
- เผยแพร่เมื่อ 23 ก.ค. 2024
- In this Python tutorial, dive deep into the power of list comprehensions, set comprehensions, and dict comprehensions.
Learn how to use list comprehension with if(conditional check) and discover when to opt for comprehensions over traditional loops. Uncover scenarios where generator expressions shine for optimal code efficiency.
👉 What's Covered:
1️⃣ List Comprehensions with Conditional Check (If-else statement)
2️⃣ Set comprehension
3️⃣ Dict Comprehension
4️⃣ When Not to Use List Comprehensions
5️⃣ The Appropriate Use of Generator Expressions
👉 Timestamps:
0:00 Intro
0:24 List Comprehension
2:21 List Comprehension using if-else statement
3:57 Set Comprehension
4:26 Dict comprehension
4:41 When Not to Use List Comprehensions
5:00 Generator Expressions
🔗 Code Snippets:
Python Series GitHub: github.com/ridwanray/Learn-Py...
This Lesson GitHub: github.com/ridwanray/Learn-Py...
⭐ Please LIKE and SUBSCRIBE for more educational content! ⭐
🌐 Connect:
Website: ridwanray.com
LinkedIn: linkedin.com/in/ridwanray
Github: github.com/ridwanray
Medium: ridwanray.medium.com
#python #pythontutorial #listcomprehension #setcomprehension #dictcomprehension #pythonfunctions - วิทยาศาสตร์และเทคโนโลยี
Support Me and The Channel:
Don't forget to Like, Comment, and Subscribe.
► Recommended Books 📜
Books: ridwanray.com/books
- Python Crash Course: amzn.to/3vLYnP9
- Python Tricks: amzn.to/48KvSA2
- Automate the boring stuff : amzn.to/3SqJzhH
- Clean Code: amzn.to/3vG5Te9
- Clean Architecture: amzn.to/3vHu9wC
► Setups 💻
Camera: Sony ZV-E10 amzn.to/4257Vkn
Monitor: Sceptre 30-inch Curved Gaming amzn.to/491KeeP
Monitor: Dell UltraSharp U2719D amzn.to/3OdA7LY
Mic: Shure MV7 amzn.to/4b8i2J2
🌐 Connect:
Website: ridwanray.com
LinkedIn: linkedin.com/in/ridwanray
Github: github.com/ridwanray
Articles:
ridwanray.com/blog
Thanks for sharing
This is good 👍. Now I can choose when to use generators instead of list. Good job 👍
Yeah. You use a generator when processing a large dataset. More about generator soon. Generator uses yield. You may want to check it out before then.
@@ridwanray thanks