मराठी

How is an array different from a list?

Advertisements
Advertisements

प्रश्न

How is an array different from a list?

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

उत्तर

An array is a collection of elements of the same data type, whereas a list can contain elements of different data types. Arrays are mainly used for storing and performing operations on numerical data efficiently, while lists are used for storing a general collection of items.

Example:

  • Array: [10, 20, 30, 40]
  • List: [10, "Apple", 25.5, True]
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Introduction to NumPy - Exercise [पृष्ठ ११३]

APPEARS IN

एनसीईआरटी Informatics Practices [English] Class 11
पाठ 6 Introduction to NumPy
Exercise | Q 2. b) | पृष्ठ ११३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×