Python printing "<built-in method ... object" instead of list
<pre><code>import numpy as np
arr = list(map(float,input().split()))
print(np.array(arr.reverse))
</code></pre>

<p>Why is this printing this instead of the contents of the list?</p>

<pre><code># outputs "&lt;built-in method reverse of list object at 0x107eeeec8&gt;"
</code></pre>

<p>You have two problems. </p>

<p>The first problem is that you are not actually <em>calling</em> the reverse method on your array <code>arr</code>.</p>

<p>You have this: <code>arr.reverse</code></p>

<p>You have to actually call it -> <code>arr.reverse()</code></p>

<p>Simple example below: </p>

<pre><code>&gt;&gt;&gt; [1,2,3].reverse
&lt;built-in method reverse of list object at 0x100662c68&gt;
</code></pre>

<p>Without calling <code>reverse</code>, the output you get is the uncalled reverse method of the <code>list</code> object. Which is very similar to the output you were getting. </p>

<p>The second problem you have is that <code>reverse()</code> method does the reverse in place, which means it performs the reverse on <code>arr</code> (your arr will be reversed) and returns <code>None</code>. So, when you are passing this: </p>

<pre><code>np.array(arr.reverse())
</code></pre>

<p>You are returning the return of <code>arr.reverse()</code> to your <code>np.array</code> call, which is <code>None</code>.</p>

<p>So, fixing those two items, by calling <code>arr.reverse()</code> on its on, and <em>then</em> passing <code>arr</code>, will give you the result you are expecting:</p>

<pre><code>import numpy as np
arr = list(map(float,input().split()))
arr.reverse()
res = np.array(arr)
print(res)
</code></pre>

<p>Demo: </p>

<pre><code>1 2 3 4
[ 4.  3.  2.  1.]
</code></pre>

python printing