Fundamentals
I tried to make it as readable a possible without comments.
def numberprint(peak): up = ''.join(map(str, range(1,peak))) down = up[::-1] return int(up + str(peak) + down)
def numberprint(x):nor = 0final = ''while nor < x:nor += 1final += str(nor)while nor > 1:nor -= 1final += str(nor)return int(final)- def numberprint(peak):
- up = ''.join(map(str, range(1,peak)))
- down = up[::-1]
- return int(up + str(peak) + down)