Pythonista has Published 42 Articles

Why there is not do...while loop in Python?

Pythonista

Pythonista

Updated on 30-Jul-2019 22:30:21

867 Views

PEP 315 (Python Enhancement Proposal) to include do..while statement has been rejected because it doen't fit in the general format of indented block statement: indented block used by every other Python compound statement. In words of Guido Van Rossum -  "Please reject the PEP. More variations along these lines won't make ... Read More

How we can come out of an infinite loop in Python?

Pythonista

Pythonista

Updated on 30-Jul-2019 22:30:21

156 Views

A loop is said to be an infinite loop when it doesn't stop on its own. It needs to be forcibly stopped by pressing ctrl-C to generate keyboard interrupt.

Advertisements