title: TypeError running Python with mysql.connector in terminal
body: <p>I'm trying to run the following python-sql connection program, that's supposed to let you change the discount of a product:</p>
  <pre class="lang-py prettyprint-override"><code>    import mysql.connector
      
      product= input(&quot;Choose product: &quot;)
      mycursor=mydb.cursor()
      
      mycursor.execute(&quot;select P_discount from Product where P_name='&quot;+product+&quot;'&quot;)
      myDiscount = mycursor.fetchall()
      
      if (myDiscount[0] == None or myDiscount[0]==0):
          print(&quot;No discount right now&quot;)
      else:
          print(&quot;The discount is: &quot;+ str(myDiscount[0]))
      
      
      
      question=input(&quot;Do want change the discount (y for yes, n for no): &quot;)
      if (question==&quot;y&quot; or question==&quot;Y&quot;):
          newDiscount=input(&quot;Choose the new discount: &quot;)
          mycursor.execute=(&quot;Update Product set P_discount='&quot;+newDiscount+&quot;' where P_name='&quot;+product+&quot;'&quot;)
          mydb.commit()
          mycursor.execute(&quot;select P_discount from Product where P_name='&quot;+product+&quot;'&quot;)
          productNewDiscount=mycursor.fetchall()
          print(&quot;New discount: &quot; + str(productNewDiscount)+&quot; $&quot;)
      
      mydb.close()
  </code></pre>
  <p>And when i do, I get the following error:</p>
  <pre><code> File &quot;DBApp.py&quot;, line 31, in &lt;module&gt;
  mycursor.execute(&quot;select P_discount from Product where P_name='&quot;+product+&quot;'&quot;)
  TypeError: 'str' object is not callable
  </code></pre>
  <p>As you can see in the code, I run the mycursor.execute() above and don't get the error.</p>