Beginning Python printing out standard deviation
<p>I'm trying to figure out what's wrong with my code. Could anyone fix it?</p>

<pre><code>def main():
   fname = input("Enter filename:")
   infile = open(fname, "r")
   SD()

def SD():
  b= []
  a = 5.0 
  r = len(b) 
  for n in range(r-1):
      b.append((r[n] -a)**2)
  m = (float(b)/r)**0.5
  print("The standard deviation is", m)
main()
</code></pre>
