break and continue in python

Python Break and Continue in Hindi| break and continue in python

Python

Python break and continue in Hindi : break and continue keyword ko ham jab istemal karte hai jab hame koi statement ko break karna ya continue karta hota hai.

Break And Continue ko Or Accha Samanjh ne ke liye iske kuch example dekhte |

break and continue in python

Break Keyword in python in Hindi

Break Keyword :- Jab Hame kisi statement ko break karna hota hai to ham break keyword in hindi ka use karte hai.

Syntax :

break

Python break statement with examples

Example :-

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

Output :-

1
2
3
4

Aap upper Diye gye output ko dekh kar program ko samanjh sakte hai.

Example 2 :-

i = 1
while i<=10:
    if i == 9:
        break
    print(i)
    i = i + 1

Output :-

1
2
3
4
5
6
7
8

Aap Upper Diye gye output ko dekh kar program ko samanjh sakte hai.

Continue Keyword in python in Hindi

Continue Keyword :- Jab Hame kisi statement ko continue karna hota hai to ham continue keyword in hindi ka use karte hai.

Syntax :

continue

Python continue statement with examples

Example :-

for i in range(1,11):
    if i == 5:
        continue
    print(i)

Output :-

1
2
3
4
6
7
8
9
10

Aap upper Diye gye output ko dekh kar program ko samanjh sakte hai.

Example 2 :-

for i in range(1,11):
    if i == 9:
        continue
    print(i)

Output :-

1
2
3
4
5
6
7
8
10

Aap Upper Diye gye output ko dekh kar program ko samanjh sakte hai.

Also Read This Post :

Dosto mujhe ummed hai ki aap Python break and continue with examples in Hindi ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

Leave a Reply

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