---
title: "Range() and tri_recursion()"  
description: "Range() and tri_recursion()"  
author: "Anonymous User"  
published: 2018-07-03  
updated: 2018-07-04  
canonical: https://www.mindstick.com/forum/34577/range-and-tri_recursion  
category: "python"  
tags: ["python-3.4", "python"]  
reading_time: 1 minute  

---

# Range() and tri_recursion()

[Difference](https://www.mindstick.com/articles/157114/good-news-or-bad-news-and-the-difference-is) between [Range](https://www.mindstick.com/articles/23243/complete-troubleshooting-tips-for-belkin-n300-range-extender-setup)() and tri_recursion() in [python](https://www.mindstick.com/articles/75378/simple-yet-useful-tips-when-using-python) ?

## Replies

### Reply by Prakash nidhi Verma

range() Function:

its a loop which is having set of number we can use the range() function.

```
for x in range(2, 6):   print(x)
```

Recursion :

Python also accepts function recursion,which means a defined function can call itself. It means that a function calls itself.

```
def tri_recursion(k):   if(k>0):
    result = k+tri_recursion(k-1)
    print(result)
  else:
    result = 0
  return result
print("\n\nRecursion Example Results")
tri_recursion(6)
```


---

Original Source: https://www.mindstick.com/forum/34577/range-and-tri_recursion

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
