print 'length of angle list not correct'+\ '({0} instead of {1})'.format(len(angle), len(self.z)) should be print 'length of angle list not correct'+\ '({0} instead of {1})'.format(len(angle), len(self.Z.z))