title: how to calculate for each values of array in python
body: <p>I am trying to save the .csv file data into an array and then apply my logic.   </p>
  
  <p>The image shows the CSV data:</p>
  
  <p><a href="https://i.stack.imgur.com/IiqQA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IiqQA.png" alt="enter image description here"></a></p>
  
  <pre><code>import csv
  import matplotlib.pyplot as plt
  from numpy import *
  
  A = []
  B = []
  X = []
  
  f = open('1.csv')
  csv_f = csv.reader(f)
  
  for row in csv_f:
  B.append(row[0])
  A.append(row[1])
  X.append(row[2])
  a = 0
  b =1
  
  y = (a+(X-A)*(b-a))/(B-A)
  
  z = array([y])
  
  print (z)
  </code></pre>
  
  <p>while running this code I am getting an error </p>
  
  <blockquote>
    <p>TypeError: unsupported operand type(s) for -: 'list' and 'list'</p>
  </blockquote>