Make pythagorean-triplet exercise compatible with Python3