Python list in Hindi | python list with examples in hindi

Python list – List Ek Data Structure hai joki aap bol sakte hai ordered collection of items | python list in hindi me ham kuch data store kar sakte hai for example :- float , string , integer |

Python list in Hindi

Python List ka Kiya Fayda Hai ? – List ko isliye ham istemal karte hai taki hame alag alag variables na banane pade & list ka istemal karke ek hi variable me ham sab kuch store kar sakte hai |

list in python ko Or Accha Samanjh ne ke liye iske A To Z example dekhte |

Python Create list

Syntax :

variable name = [ square brackets ]  

Aap upper diye gye syntax ko dekh sakte hai.

python list

python list functions

Example 1 :-

data  = [1,2,3,4,5]
print(data)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

[1,2,3,4,5]

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

Example 2 :-

data = ["Danish" , "Ali" , 29]

for i in data:
    print(i)

Output :-

Danish
Ali
29

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

python list slicing & Indexing

Example 3:-

data = ["Danish" , "Ali" , 29]
print(data[1])

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

Ali

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

Example 4:-

data = ["Danish" , "Ali" , 29]
print(data[0:2])

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

['Danish','Ali']

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

Creating lists Using Range () Function

Example 5:-

data  = list(range(0,10,1))
print(data)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

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

Aap upper Diye gye Range Function ke list create ke output ko dekh kar program ko samanjh sakte hai |

python list append

Python append Function :- Append Function List ke End Me Elements ko Add karta hai |

Example 6:-

data = ["Danish" , "Ali" , 29]
data.append(9)
data.append("MasterPrograming.com")
print(data)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

['Danish', 'Ali', 29, 9, 'MasterPrograming.com'] 

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

Updating the elements of a List

Example 7:-

data = ["Danish" , "Ali" , 29]
data[0] = 8
data[1] = 10
data[2] = 15
print(data)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

[8,10,15]

Aap upper Diye gye Updating elements ke output ko dekh kar program ko samanjh sakte hai |

python list del function

Python Delete Function :- Del Function ek index function leta hai or jo index number leta hai use hi delete karta hai |

Example 8:-

data = ["Danish" , "Ali" , 29]
del data[1]
print(data)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

['Danish',29] 

Aap upper Diye gye del function ke output ko dekh kar program ko samanjh sakte hai |

python list remove

Python Remove Function :- Remove Function ek value leta hai or use hi wo delete karta hai |

Example 9:-

data = ["Danish" , "Ali" , 29]
data.remove(29)
data.remove("Danish")
print(data)
    

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

['Ali'] 

Aap upper Diye gye Remove function ke output ko dekh kar program ko samanjh sakte hai |

python list pop

Python Pop Function :- Pop Function List ke End Me se ek Elements delete karta hai |

Example 10:-

data = ["Danish" , "Ali" , 29]
data.pop()
print(data)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

['Danish', 'Ali'] 

Aap upper Diye gye Pop Function ke output ko dekh kar program ko samanjh sakte hai |

Concatenation of two lists

Example 11:-

data1 = ["Danish" , "Ali" , 29]
data2 = ["Master" , "Programing", ".com"]

print(data1 + data2)    # concatenation data1 and data2

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

['Danish', 'Ali', 29, 'Master', 'Programing', '.com'] 

Aap upper Diye gye Concatenation of two lists ke output ko dekh kar program ko samanjh sakte hai |

Python list copy

Python Copy() Function :- copy Function keval copy karta hai |

Example 12:-

data = ["Danish" , "Ali" , 29]
data2 = data.copy()
print(data)
print(data2)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

['Danish', 'Ali', 29]                                                                                                         
['Danish', 'Ali', 29]  

Aap upper Diye gye copy() Function ke output ko dekh kar program ko samanjh sakte hai |

Python list extend

Python extend() Function :- extend Function list ko add karta hai |

Example 13:-

data = ["Danish" , "Ali" , 29]
data2 = ["Master", "Programming"]
data2.extend(data)
print(data2)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

['Master', 'Programming', 'Danish', 'Ali', 29] 

Aap upper Diye gye extend() Function ke output ko dekh kar program ko samanjh sakte hai |

Python list Clear

Python clear() Function :- clear Function list ko bilkul clear karta hai |

Example 14:-

data = ["Danish" , "Ali" , 29]
data.clear()
print(data)

Aap Upper Diye Gye Program ko samanjh sakte hai.

Output :-

[] 

Aap upper Diye gye clear() Function ke output ko dekh kar program ko samanjh sakte hai |

List in python video

Dosto mujhe ummed hai ki aap python list with examples 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 |

Please follow and like us:
error
Summary
Review Date
Reviewed Item
python list with examples in Hindi
Author Rating
51star1star1star1star1star

Danish Ali

I Am a 1st Sem BCA Student & I have Skills C, C++ ,Python, HTML,CSS, Computer & Advance Hacking & Blogger & YouTuber.

3 thoughts on “Python list in Hindi | python list with examples in hindi

Leave a Reply

Your e-mail address will not be published. Required fields are marked *