title: Inputting a list of numbers into a function?
body: <p>I have a text file with a list of numbers all in one column for my input values, and want to use a defined function to spit out a list of output numbers. The function works fine as I tested with floating numbers, but I'm getting an error when inputting the list. What I have so far is:</p>
  <pre><code>#Read in text file 
  text_file = open('example.txt', &quot;r&quot;)
  
  #Converting file into list
  ex_list = text_file.readlines()
  text_file.close()
  
  #Defining function 
  def f(x):
  return (x - (5*math.log10(132)))
  
  #Now inputting list of numbers into function 
  f(ex_list)
  </code></pre>
  <p>But I'm getting an error saying &quot;unsupported operand type(s) for -: 'str' and 'float'&quot; which I'm assuming doesn't like the list format. I checked, and each value is a string of size 8, when I'm guessing should be an integer of size 1. So I didn't convert the list properly, any kind of help would be greatly appreciated.</p>