paint-brush
Recursion vs. Looping in Pythonby@ethan.jarrell
44,219 reads
44,219 reads

Recursion vs. Looping in Python

by Ethan Jarrell14mJanuary 17th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
EN

Too Long; Didn't Read

One of the most fundamental tools in programming is a loop. While there are many different types of loops, almost each type of loop has the same basic function: iterating over data to analyze or manipulate it. Recursion is another popular type of function and although it can also analyze and manipulate sequences of data similar to a loop, recursion is probably less understood in many cases, and can often be somewhat confusing. Almost all recursive functions can be re-written as loops, and vice versa. However, each type of function has advantages and disadvantages, and knowing when to use one over the other is something we’ll take a look at here. In the following post, we’re going to try and answer the following questions:

Coin Mentioned

Mention Thumbnail
featured image - Recursion vs. Looping in Python
Ethan Jarrell HackerNoon profile picture
Ethan Jarrell

Ethan Jarrell

@ethan.jarrell

L O A D I N G
. . . comments & more!

About Author

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite