Important Notice:

Course Content
Tuples in Python (Chapter-8) M3-R5
About Lesson

Difference between List & Tuple:-

           

Sr. No.

List

Tuple

1

लिस्ट को  square brackets [ ] के अन्दर रखते हैं

Tuple को parentheses ( ) के अन्दर रखते हैं

2

List mutable होता है

Tuple immutable होता है

3

List को read and write कहा जाता है

Tuple को read only कहा जाता है

4

List mutable है जिसमें individual item or entire item को replace किया जा सकता है

Tuple immutable है जैसे string

5

List heterogeneous datatype को used करती है

Tuple homogeneous & heterogeneous दोनों datatype को hold करता है

6

List is slower for iterating element

Tuple list की अपेक्षा faster होता है

 

 

Difference between List & Tuple:-

           

Sr. No.

List

Tuple

1

The list is placed inside square brackets [ ]

Tuple is placed inside parentheses ( )

2

List is mutable

Tuple is immutable

3

List is called read and write

Tuple is called read only

4

List is mutable in which individual item or entire item can be replaced.

Tuple is immutable like string

5

List uses heterogeneous datatype

Tuple holds both homogeneous & heterogeneous datatypes.

6

List is slower for iterating element

Tuple is faster than list

error: Content is protected !!