```
def my_print(n):
print(n,end=', ')
my_print(n-1)
my_print(5)
```

Above code will generate error saying, RecursionError: maximum recursion depth exceeded in comparison as this will continue the recursion steps infinitely.
In our real life situation we can imagine by placing one object between two parallel mirrors. This will generate infinite number of images.

### Video Tutorial on Recursion

```
import sys
print(sys.getrecursionlimit())
sys.setrecursionlimit(2000)
print(sys.getrecursionlimit())
```

Output
```
1000
2000
```

```
def my_print(n):
if (n >=0):
print(n,end=', ')
my_print(n-1)
my_print(5)
```

The best example to use recursive function is to create Fibonacci series and to generate factorial of a number.
All Sample codes Armstrong Number

This article is written by **plus2net.com** team.

Post your comments , suggestion , error , requirements etc here

Python Video Tutorials

Python SQLite Video Tutorials

Python MySQL Video Tutorials

Python Tkinter Video Tutorials