For a given data D=[“Mukesh", "Gitika"], identify its type:
a. Dictionary
b. Tuple
c. List
d. String
Answers
Answered by
7
D = ["Mukesh", "Gitika"]
The above line is declaring a list into D with the elements "Mukesh" and "Gitika". Hence, the answer is (c) List.
Lists are sequences of ordered elements. They are enclosed using square brackets. Lists are mutable, i.e., the elements within a list can be changed. It can have multiple data types of elements in it. However, when performing a sorting function with lists, the elements in the list will have to be of a uniform data type.
An example for a list would be the data given in the question, D = ["Mukesh", "Gitika"]
Similar questions