Python using int function
<p>I can't run the code below because of the 7th line <code>value = int(qty)*int(price)</code>. I can only run it if I use the <code>int()</code> function inside the <code>print()</code> function. Is there a way I can define it's an integer before I ask it to print? The same for <strong>float</strong>?</p>

<pre><code>file = open("C:\\file.txt","r")
for mid in file:
    qty = mid[38:53]
    qty = qty.lstrip("0")
    price = mid[75:86]
    price = price.lstrip("0")
    value = int(qty)*int(price)
    trades = [qty,price,value]
    print (trades)
file.close()
</code></pre>

<p>Shell--></p>

<blockquote>
  <p>ValueError: invalid literal for int() with base 10: ''</p>
</blockquote>