---
title: "While loop in python"  
description: "While loop in python"  
author: "Anonymous User"  
published: 2018-07-04  
updated: 2018-07-04  
canonical: https://www.mindstick.com/forum/34579/while-loop-in-python  
category: "python"  
tags: ["python-3.4"]  
reading_time: 1 minute  

---

# While loop in python

[Explain](https://www.mindstick.com/forum/157854/what-is-system-debugging-explain-some-system-debugging-tools-used-in-modern-computer-systems) [while loop](https://www.mindstick.com/forum/155714/define-while-loop) in [python](https://www.mindstick.com/articles/75378/simple-yet-useful-tips-when-using-python) ?

## Replies

### Reply by Prakash nidhi Verma

The while Loop in python :

Example:

```
i = 1 while i < 5:
  print(i)
  i += 1
```

Break statement :

EX:

```
i = 1 while i < 5:
  print(i)
  if i == 3:
    break
  i += 1
```

\

continue statement:

Ex:

```
i = 0 while i < 5:
  i += 1
  if i == 3:
    continue
  print(i)
```

\


---

Original Source: https://www.mindstick.com/forum/34579/while-loop-in-python

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
