Python For Loop in Hindi | For Loop In Python in Hindi

Python for Loop in Hindi – Loop ka istemal sequence ke elements ko iterate karne ke liye kiya jata hai | python For Loop ko in sab function me istemal kar sakte hai – list, tuple, dictionary or string |

Python Me Loop 2 Tarah Ki Hoti Hai |

Loop ko Or Accha Samanjh ne ke liye iske kuch example dekhte.

python For loop Statement in Hindi

Syntax :

for val in sequence:
	Body of for

Aap upper diye gye syntax ko dekh sakte hai.

python for loop

Python for loop with examples in Hindi

Example :-

for i in range(1,11):
     print(i)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

1
2
3
4
5
6
7
8
9
10

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

Example 2 :-

a = [1,2,3,4,5]

for i in a:
    print(i)

Output :-

1
2
3
4
5

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

Example 3:-

for i in range(1,11):
     print(f"Hello World {i}")

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

Hello World 1
Hello World 2
Hello World 3
Hello World 4
Hello World 5
Hello World 6
Hello World 7
Hello World 8
Hello World 9
Hello World 10

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

Example 4:-

tuple = (1, 2, [3, 4, 5], 6, 7, 8,[9,10])
for a in tuple:
    print(a)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

1
2
[3, 4, 5]
6
7
8
[9,10]

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

for loop in python video

Also Read This Post :

Dosto mujhe ummed hai ki aap Python for loop 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 |

Danish Ali

I Am a Cyber Security Student & I have Skills C, C++ ,Python, HTML,CSS, Computer & Advance Hacking & Blogger & YouTuber.

Leave a Reply

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

Show Buttons
Hide Buttons