# Python Number Pattern 47

You are Here:

## Python Number Pattern 47

Try to print the following number pattern using Python.

Print This Output
```5 5 5 5 5 5 5 5 5
5 4 4 4 4 4 4 4 5
5 4 3 3 3 3 3 4 5
5 4 3 2 2 2 3 4 5
5 4 3 2 1 2 3 4 5
5 4 3 2 2 2 3 4 5
5 4 3 3 3 3 3 4 5
5 4 4 4 4 4 4 4 5
5 5 5 5 5 5 5 5 5
```

### Source Code

Python Compiler
for i in range(5, 0, -1): for j in range(5, 1, -1): if(j > i): print(j, end=" ") else: print(i, end=" ") for j in range(1, 6): if(j > i): print(j, end=" ") else: print(i, end=" ") print() for i in range(2, 6): for j in range(5, 1, -1): if(j > i): print(j, end=" ") else: print(i, end=" ") for j in range(1, 6): if(j > i): print(j, end=" ") else: print(i, end=" ") print()

### Output

5 5 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 5 5 4 3 3 3 3 3 4 5 5 4 3 2 2 2 3 4 5 5 4 3 2 1 2 3 4 5 5 4 3 2 2 2 3 4 5 5 4 3 3 3 3 3 4 5 5 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5

## Reminder

Hi Developers, we almost covered 90% of String functions and Interview Question on Python with examples for quick and easy learning.

We are working to cover every Single Concept in Python.