Ideally these would all be of a "while True:" format. This one particularly is problematic, as you can't use it to get the sixth number in the list of squares.