You are right. Element 4 should be included and 2 should be excluded.
a[2:3] should produce and output of array([3,4])
By mistake I did, "a = a.flatten" instead of "a = a.flatten()". After this my array "a" was converted into a builtin function, I checked the type of "a" and it was "builtin_function_or_method" instead of "numpy.ndarray". I know my array was converted into a function but I don't understand how it actually got converted and what sort of a function it is now and what all operations I can perform using it. It would be great help if you elaborate on this issue. Thanks in advance :)