Change from list comprehensions to loops in bootstrap

This will make the algorithm easier for students
to understand.