Python Tutorial

Python Home

Python Methods

Python String Methods

Python Interview Programs

Python Common ProgramsPython Array ProgramsPython Converter ProgramsPython Star Patterns ProgramPython Number Patterns ProgramPython Alphabet Patterns Program

Python Reference

ASCII Table

Python Number Pattern 23

Last Updated:

Python Number Pattern 23

Try to print the following number pattern using Python.

Print This Output
1234554321
1234**4321
123****321
12******21
1********1

Source Code

Python Compiler
for i in range(6, 1, -1): for j in range(1, i): print(j, end="") for k in range(i, 6): print("**", end="") for m in range(i-1, 0, -1): print(m, end="") print()

Share this Page

Meet the Author