Question Python
Question Python
Lists and Tuples are both sequence data types that can store a collection of objects in Python.
The objects stored in both sequences can have different data types. Lists are represented with square
brackets [], while tuples are represented with round brackets ().
Difference between the two is that while lists are mutable, tuples are immutable objects. This means
that lists can be modified, appended or sliced on the go but tuples remain constant and cannot be
modified in any manner
19. What is the difference between Python Arrays and lists?
Arrays in python can only contain elements of same data types
Lists in python can contain elements of different data types
List consuming large memory more than Arrays