Conclusion
Enumerate()
-
Enumeration
is a complete, ordered listing of all the items in a collection.
-
Enumerate
function can be used to refer to a listing of all of the elements of a set.
-
It
can simplify the algorithm when user needs to split the data into different
groups and it’s easier to give specified conditions.
Recursion
-
Recursion
is the process of repeating items in a self-similar way.
-
It
can split more complicated questions into small parts.
-
Each
recursive function needs a base case to ensure it will stop at certain level
and the function calls itself.
-
Each
recursion works towards the base case.
Input
-
Input
is to provide or give something to the computer.
-
Using
function input() to handle inputs in Python.
Miscellaneous
-
Using
words.pop(0)
to delete the first string from the list. (Avoid infinite loops!)
-
Different
parameters of print() will result in different
layouts.
In conclusion, we discussed the concept of enumerate and recursion, combined with the
use of nested loop to create a working program. The concept of enumerate is
widely used in mathematics and theoretical computer science (as well as applied
computer science), as well as recursion. Try to get used to these terms, though
it might be unfamiliar for now, but eventually you will master this.