saving . . . saved doubt in shape function has been deleted. doubt in shape function has been hidden .
doubt in shape function
Title
Question
--------------------------------------------------------
In [68]: print(ar)
[1 2 3 4 5 6 7 8]

In [69]: ar.shape()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-69-895c9f3eff17> in <module>
----> 1 ar.shape()

TypeError: 'tuple' object is not callable

Python-3.4.3 Getting-started-with-arrays 05-06 min 0-10 sec 08-05-20, 1:26 a.m. archana.naware@gmail.com

Answers:

Your variable ar is a list and not an array. shape function is callable with array only.
Also you have typed the wrong syntax. 
Type ar= array([1,2,3,4,5,6,7,8]) and then type ar.shape. you will get the shape of the array.
08-05-20, 10:01 a.m. aditya94palaparthy@gmail.com


Log-in to answer to this question.