Python program to print Pattern example 77

size = 4
= 1
for x in range(size, -(size + 1), -1):
    for y in range(1, abs(x) + 1):
        print(" ", end="")

    if (>= 0):
        p = 1
    else:
        p = y + 1

    for z in range(size, abs(x) - 1, -1):
        print(str(p) + " ", end="")
        p += 1
    print()

Output:
Patterns Programs

Subscribe For Daily Updates

100+ Python Pattern Examplespython pattern examples - star patterns, number patterns