Project 14: Subscriber Batch Splitter
Data Engineer
Builds on these lessons
Current Task
Objective
np.array_split() breaks one array into N roughly-equal pieces — useful for batching work, unlike np.split() which requires an exact even division.
Task: split a 6-item subscribers array into 3 batches and print the result.
index.py
import numpy as np
subscribers = np.array(['a@x.com', 'b@x.com', 'c@x.com', 'd@x.com', 'e@x.com', 'f@x.com'])
batches = np.array_split(subscribers, 3)
print(batches)
* Hint: Correct characters turn green, incorrect ones turn red.
Live Preview
🖼️
Verify your code to see the preview