Author a generator function read_batches(rows, batch_size) that yields successive batches (lists) of batch_size rows, including a final short batch. Assign the full list of batches to result.
Ready to take your skills to the next level? Enroll in our comprehensive Data Analyst Career Track to master SQL, Python, Excel, and Power BI.
Run your code to see the result here.