title: How to correct a str that isn't callable?
body: <p>Following a udemy course and I'm stuck at this &quot; 'str object is not callable &quot; error. I've basically copied and pasted the snippet of code giving me an issue and it still produces the same error. Haven't found anything with the exact issue I'm having but I won't be surprised if it's a comically simple fix!</p>
  <p>The issue is with the &quot;ops_function&quot; bit throwing a 'str' object is not callable error.</p>
  <p>Let me know if you need more info and thank you for any insight!</p>
  <pre><code>from art import logo
  print(logo)
  
  def add(a, b):
      return a + b
  def subtract(a, b):
      return a - b
  def multiply(a, b):
      return a * b
  def divide(a, b):
      return a / b
  
  operations = {
      &quot;+&quot;: &quot;add&quot;,
      &quot;-&quot;: &quot;subtract&quot;,
      &quot;*&quot;: &quot;multiply&quot;,
      &quot;/&quot;: &quot;divide&quot;
  }
  
  first = int(input(&quot;Enter a number: &quot;))
  second = int(input(&quot;Enter another number: &quot;))
  
  for op in operations:
      print(op)
  
  op_choice = input(&quot;Select an operator from the list above: &quot;)
  ops_function = operations[op_choice]
  answer = ops_function(first, second)
  
  print(f&quot;{first} {op_choice} {second} = {answer}&quot;)
  </code></pre>