इसका आउटपुट क्या है:
what is the output of:
import numpy as nd
x= nd.array([2,3,4,10,12,14,18])
print(x[:3])
A
[3,4,10,12,14,18]
B
[2 3 4]
C
[2,3]
D
[2,3,4,10]
Explanation
The slice x[:3] gets the elements from index 0 to 2, which are [2, 3, 4].
Answer: (B) [2 3 4]
Correct Answer: B) [2 3 4]