Vidyalelo
Data Structure · Q18

Arrays in Data Structures

Programming · Data Structure · question 18

Q18

What is the correct way to initialize an array of size 5 in Python?

A.
array = [0] * 5
Answer
B.
array = {0, 0, 0, 0, 0}
C.
array = (0, 0, 0, 0, 0)
D.
array = new array[5]

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board