Which statement is used to create an infinite loop in Python intentionally?

  • break
  • for i in range(10):
  • if condition:
  • while True:
To create an intentional infinite loop in Python, you can use the while True: statement. It will continue to execute the code block indefinitely until explicitly interrupted.
Add your answer
Loading...

Leave a comment

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