Important Notice:

List as a Mutable Data Type

List as a Mutable Data Type

1 views 1 min read

List as a Mutable Data Type :-

Python में List एक Mutable Data Type है। इसका मतलब है कि List बनने के बाद हम उसके elements को change, add या remove कर सकते हैं।

Example

 numbers = [10, 20, 30]

numbers[1] = 50

print(numbers)
 

Output:

[10, 50, 30]
 
 
 

यहाँ 20 को बदलकर 50 कर दिया गया। इसलिए List को Mutable कहा जाता है।

 

In english-

List as a Mutable Data Type

In Python, List is a Mutable Data Type. This means that after a List is created, we can change, add, or remove its elements.

Example

 numbers = [10, 20, 30]

numbers[1] = 50

print(numbers)
 

Output:

[10, 50, 30]
 

Here, 20 is changed to 50. Therefore, a List is called a Mutable Data Type.

Related Notes