मराठी

Differentiate between tuple and list.

Advertisements
Advertisements

प्रश्न

Differentiate between tuple and list.

फरक स्पष्ट करा
Advertisements

उत्तर

List Tuple
A list is a sequence of values of any type. A tuple is a sequence of values of any type.
It is enclosed in square brackets []. It is enclosed in parentheses ().
It is mutable; values in the list can be modified. It is immutable; values of tuples cannot be changed in place.
List methods include append(), extend(), insert(), remove(), sort() and reverse(). Tuple functions include len(), max(), min() and tuple().
Example: [10, 20, 30] Example: (10, 20, 30)
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1: Review of Phython - EXERCISE [पृष्ठ २७]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
पाठ 1 Review of Phython
EXERCISE | Q 26. | पृष्ठ २७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×