मराठी

Give one point of difference between an array and a list in Python.

Advertisements
Advertisements

प्रश्न

Give one point of difference between an array and a list in Python.

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

उत्तर

Basis of Difference Array Python List
Data type of elements Usually stores elements of the same data type. Can store elements of different data types.
Size Traditionally has a fixed size. Has variable length; elements can be added or removed.
Storage Stores contiguous values of a similar type. Stores contiguous references (pointers) to objects.
Example An array of integers [4, "Good", 8.45, "k"]
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 5: Liner List Manipulation - EXERCISE [पृष्ठ १०४]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
पाठ 5 Liner List Manipulation
EXERCISE | Q 3. | पृष्ठ १०४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×