Update labstest.py

changed looping structure.