# Python pattern programming – Part 2

You can find variety of python patterns with programming in Python pattern programming – Part 2. While doing python programming there are few things to remember like spaces are very important and need accurate coding otherwise your code will not execute.

Python pattern programming – 01

```def pattern(n):
for i in range(1,n+1):
for j in range(1,i+1):
print(i,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 02

```def pattern(n):
for i in range(1,n+1):
for j in range(1,i+1):
print(j,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 03

```def pattern(n):
for i in range(1,n+1):
for j in range(i,0,-1):
print(j,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 04

```def pattern(n):
for i in range(n,0,-1):
for j in range(n,i-1,-1):
print(j,end="")
print("\r")

n=5
pattern(n)```

Python pattern programming – 05

```def pattern(n):
for i in range(n,0,-1):
for j in range(i,n+1):
print(j,end="")
print("\r")

n=5
pattern(n)```

You can find variety of python patterns with programming in Python pattern programming – Part 2. While doing python programming there are few things to remember like spaces are very important and need accurate coding otherwise your code will not execute.

Python pattern programming – 06

```def pattern(n):
for i in range(n,0,-1):
for j in range(0,i):
print(i,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 07

```def pattern(n):
for i in range(n,0,-1):
for j in range(1,i+1):
print(j,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 08

```def pattern(n):
for i in range(n,0,-1):
for j in range(i,0,-1):
print(j,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 09

```def pattern(n):
for i in range(1,n+1):
for j in range(i,n+1):
print(j,end="")
print("\r")

n=5
pattern(n)```

Python pattern programming – 10

```def pattern(n):
for i in range(n,0,-1):
for j in range(n,n-i,-1):
print(j,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 11

```def pattern(n):
for i in range(0,n+1):
for k in range(n,i,-1):
print(" ",end="")
for j in range(0,i):
print(i,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 12

```  def pattern(n):
for i in range(0,n+1):
for k in range(n,i,-1):
print(" ",end="")
for j in range(1,i+1):
print(j,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 13

```def pattern(n):
for i in range(1,n+1):
for k in range(n,i,-1):
print(" ",end="")
for j in range(n,n-i,-1):
print(j,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 14

```def pattern(n):
for i in range(1,n+1):
for k in range(n,i,-1):
print(" ",end="")
for j in range(n-i+1,n+1):
print(j,end="")
print("\r")

n=5
pattern(n)
```

Python pattern programming – 15

```def pattern(n):
for i in range(0,n+1):
for k in range(n,i,-1):
print(" ",end="")
for j in range(i,0,-1):
print(j,end="")
print("\r")

n=5
pattern(n)
```