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 ของคุณ -
💬
ติวเตอร์ AI ส่วนตัว
ติดขัดในบทเรียน? ถามติวเตอร์ในตัวของคุณได้ทุกอย่าง ทุกเวลา -
♾️
เข้าถึงตลอดชีพ
กลับมาเรียนได้ตลอด ไม่มีหมดอายุ -
📱
โทรศัพท์หรือคอมพิวเตอร์
ใช้งานได้ทุกที่ ทุกอุปกรณ์ -
💸
คืนเงิน 30 วัน
ไม่ต้องอธิบาย -
⚡
กระชับและตรงประเด็น
1 ชม. 57 นาที เนื้อหาเชิงปฏิบัติ
รีวิว
ยังไม่มีรีวิว — เป็นคนแรกที่แชร์ประสบการณ์
ผู้เรียนคนอื่นเรียน
💼 พร้อมสำหรับงาน
Python Scripting: การสร้างระบบจัดการนายหน้าลูกค้า
ใบรับรอง
ลงมือทำ
฿179
→
🎓 มีใบรับรอง
การเขียนโปรแกรมภาษาไพธอนเชิงวิทยาศาสตร์: เรียนรู้โดยการแก้ไขปัญหาโปรเจคทางปฏิบัติ
ใบรับรอง
ลงมือทำ
฿179
→
🔥 เป็นที่ต้องการ
เขียนโค้ดภาษาไพธอนอย่างมีประสิทธิภาพ: พื้นฐานความเร็วและปรับปรุงประสิทธิภาพ
ใบรับรอง
ลงมือทำ
฿179
→
🌟 ที่นิยมในหมู่ผู้เรียน
วิศวกรรมข้อมูลขนาดใหญ่ด้วยสกาล่า
ใบรับรอง
ลงมือทำ
฿179
→
คำถามที่พบบ่อย
ฉันต้องใช้อะไรในการเรียนคอร์สนี้? +
แค่โทรศัพท์หรือคอมพิวเตอร์ที่มีอินเทอร์เน็ต ไม่ต้องติดตั้งหรือใช้อุปกรณ์พิเศษ
ฉันชำระเงินอย่างไร? +
ผ่านบัตรด้วย Stripe เราไม่เก็บข้อมูลบัตร — Stripe จัดการอย่างปลอดภัย
ฉันขอคืนเงินได้ไหม? +
ใช่ — คืนเงินเต็มจำนวนใน 30 วัน ไม่ต้องอธิบาย
ฉันมีสิทธิ์เข้าถึงนานเท่าไร? +
ตลอดไป เมื่อซื้อแล้วคอร์สเป็นของคุณ กลับมาเรียนได้ตลอด
ฉันจะได้ใบประกาศนียบัตรไหม? +
ได้ เมื่อเรียนจบจะได้รับใบประกาศนียบัตรที่เพิ่มในโปรไฟล์ LinkedIn ได้
ออกแบบสำหรับผู้เรียนใน
เทคโนโลยี
ดีไซน์
การเงิน
การตลาด
สาธารณสุข
การศึกษา
ธุรกิจการบริการ
อุตสาหกรรม
×2
เติมครั้งเดียว จ่ายครึ่งเดียว
เพิ่ม ฿3,600 → รับ 200 เครดิต แต่ละคลาสราคา ฿90.00 แทน ฿179 เครดิตไม่มีวันหมดอายุ
฿3,600
200 เครดิต
฿90.00 / คลาส
คุ้มที่สุด
฿9,000
550 เครดิต
฿81.82 / คลาส
฿18,000
1200 เครดิต
฿75.00 / คลาส
ไม่มีการสมัครสมาชิก เครดิตใช้ได้กับทุกคลาสและไม่หมดอายุ