Jan-24-2020, 03:26 PM
If you can't use loops, you can use recursion. Since it should only recurse 3 times, there won't be a stack overflow problem. Here's an example of recursion:
def recurse(x): print(x) if x > 0: recurse(x - 1) recurse(4)That will output this:
Output:4
3
2
1