Which of the following datatype is correct for the object below? D = ['python', 3.43, 'p', 100] a. Array b. Dictionary c. Tuple d. List
Answers
Answered by
1
Answer:
tuple
Explanation:
I think that is done
Answered by
0
Answer:
d. List is the correct datatype for the object D = ['python', 3.43, 'p', 100]
Explanation:
- A list is an ordered data structure used to store one or more objects or values.
- All the items of a list are stored under a common variable and the list is created using square brackets.
- A list can contain a single data type or multiple data types.
Explanation for incorrect options:
a. Array
- An array is a collection of data items stored under a common name in consecutive memory locations.
- The elements of an array must strictly be of the same data type.
b. Dictionary
- A dictionary is an unordered collection used to store data values in key:value pairs.
c. Tuple
- A tuple is a collection of objects separated by commas.
- A tuple is ordered, unchangeable, and consists of objects of the same data type.
#SPJ3
Similar questions