In Python, how can you execute a block of code multiple times without using a loop?

  • List Comprehension
  • Recursion
  • exec() function
  • goto statement
In Python, you can execute a block of code multiple times without using a loop by using recursion, where a function calls itself. This allows for repeated execution without an explicit loop construct.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *