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 27

Last Updated:

Python Number Pattern 27

Try to print the following number pattern using Python.

Print This Output
1
121
12321
1234321
123454321

Source Code

Python Compiler
for i in range(2, 7): for j in range(1, i): print(j, end="") for k in range(i-2, 0, -1): print(k, end="") print()

Share this Page

Meet the Author