Python 0-to-Hero Mastery (Big Tech SDE & ML Standard) › 09. The Iterator Protocol (__iter__, __next__) & Generator Functions
45 mins
← Prev Next →
Course Syllabus
Interactive Lesson Studio
Loading lesson content...

🎯 Big Tech Coding & Interview Challenges

Practice these curated problems. Click "Load in Sandbox" to solve live in the Code Studio!

1 Questions
Easy

1. Memory-Efficient Chunk Streamer

Ek generator function `stream_chunks(items, size=2)` likhein jo collection ko memory-safe chunks me stream kare.

💡 View Pro Interview Hint
• Use range step of chunk size with yield slicing.
Python 3.12
Live Execution Terminal
Click "Execute Live" to run code.