Untitled

mail@pastecode.io avatar
unknown
plain_text
3 years ago
466 B
0
Indexable
Never
limit = 6
string = str()
old_num = str()
nums = []
for number in range(limit):
    numbers = ''.join(nums)
    string += f'{old_num}{str(str(number)*(limit-number))*2}{numbers[0:]}\n'
    old_num += str(number)
    if number == 0:
        nums.append(str(number))
        continue
    nums.insert(0,str(number))

nums = string.split('\n')
nums.reverse()
for number in nums:
    if number != '':
        string += f'{number}\n'  
    
print(string)