title: TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
body: <p>I am completely new to python and am having some trouble getting to grips with this stuff. I keep getting the aforementioned error message corresponding to line 14 and onwards (starting with p=) in the code below. Any help will be much appreciated. Thank you!</p>
  
  <pre><code>file = open('random.txt','r')
  lines = file.readlines()
  file.close()
  
  import pandas
  
  colnames = ['x', 'y', 'e']
  data = pandas.read_sv('random.txt', names=colnames)
  
  x = data.x.tolist()
  y = data.x.tolist()
  e = data.x.tolist()
  
  p = [sum(1/int(a**2) for a in e)]
  q = [sum(b/int(a**2) for b, a in zip(x, e))]
  r = [sum(c/int(a**2) for c, a in zip(y, e))]
  s = [sum(b**2/int(a**2) for b, a in zip(x, e))]
  t = [sum(b*c/int(a**2) for c, b, a in zip(y, x, e))]
  delta = p*s - q**2
  
  a = (r*s - q*t)/delta
  b = (p*t - q*r)/delta
  
  import math
  Ua = math.sqrt(s/delta)
  Ub = math.sqrt(p/delta)
  
  print('a', 'b', 'Ua', 'Ub')
  </code></pre>