I'm not sure how they're going to stop the pythons from eating the Apples, but if I had to do his homework this is what I'd probably do.
import random
boxes = [[] for x in range(10)]
for apple in range(100):
random.choice(boxes).append(apple)
## don't do it like this
# [random.choice(boxes).append(apple) for apple in range(100)]