Python Generators: Working with Yield and Return
Learn to write memory-efficient Python code by mastering generator functions and understanding the precise differences between the yield and return statements.
เกี่ยวกับคอร์สนี้
Writing efficient Python code requires managing system memory effectively, especially when working with large datasets. Understanding the fundamental mechanics of generator functions is key to achieving this efficiency. This text-based course guides you through the core concepts of Python generators, clarifying the exact behavioral differences between the yield and return statements. You will transition from writing standard list-returning functions to constructing memory-efficient data pipelines. What you'll learn: Understand the fundamental mechanics of generator functions and how they pause execution; Differentiate between the yield and return statements and their impact on control flow; Manage generator lifecycles and handle StopIteration exceptions gracefully; Apply modern Python type hints to generators and iterators for cleaner, self-documenting code; Build memory-efficient data processing pipelines using clean, readable syntax. The course starts with essential terminology and the foundational mechanics of iteration in Python. You will then progress through written explanations and code examples that demonstrate how to control execution flow, manage state, and optimize performance. This course is designed for beginner Python developers looking to improve their code efficiency; no prior experience with generators is required. Start reading today to unlock the full power of memory-efficient programming in Python.
สิ่งที่คุณจะได้รับ
-
📜
ใบประกาศนียบัตร
เพิ่มในโปรไฟล์ LinkedIn ของคุณ -
💬
Personal AI tutor
Stuck on a lesson? Ask your built-in tutor anything, any time. -
♾️
เข้าถึงตลอดชีพ
กลับมาเรียนได้ตลอด ไม่มีหมดอายุ -
📱
โทรศัพท์หรือคอมพิวเตอร์
ใช้งานได้ทุกที่ ทุกอุปกรณ์ -
💸
คืนเงิน 30 วัน
ไม่ต้องอธิบาย -
⚡
กระชับและตรงประเด็น
1 ชม. 57 นาที เนื้อหาเชิงปฏิบัติ
รีวิว
ยังไม่มีรีวิว — เป็นคนแรกที่แชร์ประสบการณ์
ผู้เรียนคนอื่นเรียน
พัฒนา ระบบจัดการบนคอนโซลที่ใช้งานได้จริง โดยใช้หลักการเขียนโปรแกรมเชิงวัตถุ (object-oriented principles) และตรรกะทางธุรกิจ (business logic) ของ Python เพื่อจัดการข้อมูลลูกค้าและการคำนวณค่าคอมมิชชั่น
$4.99
สร้างพื้นฐานที่แข็งแกร่งในภาษาไพธอน และเรียนรู้ที่จะแก้ไขปัญหาทางวิทยาศาสตร์และข้อมูลที่ขับเคลื่อนด้วยโลกแห่งความเป็นจริง ใช้วิธีการเขียนโปรแกรมสมัยใหม่และฝึกฝนการเขียน
$4.99
เรียนรู้วิธีการเขียนโค้ดภาษาไพธอนที่สะอาด เร็ว และประหยัดทรัพยากร โดยการทำโปรไฟล์การประมวลผล การปรับโครงสร้างข้อมูลให้เหมาะสม และใช้ประโยชน์จากการประมวลผลแบบเวกเตอร์
$4.99
สร้างแอพพลิเคชันข้อมูลกระจายโดยใช้ DataFrames, Spark SQL และ RDDs ในขณะที่เรียนรู้พื้นฐานการประมวลผลข้อมูลขนาดใหญ่ด้วย Scala
$4.99
คำถามที่พบบ่อย
ฉันต้องใช้อะไรในการเรียนคอร์สนี้? +
แค่โทรศัพท์หรือคอมพิวเตอร์ที่มีอินเทอร์เน็ต ไม่ต้องติดตั้งหรือใช้อุปกรณ์พิเศษ
ฉันชำระเงินอย่างไร? +
ผ่านบัตรด้วย Stripe หรือคริปโต เราไม่เก็บข้อมูลบัตร — Stripe จัดการอย่างปลอดภัย
ฉันขอคืนเงินได้ไหม? +
ใช่ — คืนเงินเต็มจำนวนใน 30 วัน ไม่ต้องอธิบาย
ฉันมีสิทธิ์เข้าถึงนานเท่าไร? +
ตลอดไป เมื่อซื้อแล้วคอร์สเป็นของคุณ กลับมาเรียนได้ตลอด
ฉันจะได้ใบประกาศนียบัตรไหม? +
ได้ เมื่อเรียนจบจะได้รับใบประกาศนียบัตรที่เพิ่มในโปรไฟล์ LinkedIn ได้
ออกแบบสำหรับผู้เรียนใน
เทคโนโลยี
ดีไซน์
การเงิน
การตลาด
สาธารณสุข
การศึกษา
ธุรกิจการบริการ
อุตสาหกรรม