title: I can't convert an empty string to integer using python
body: <p>I use pySerial to read data from serial port and I am trying to convert the string below to integer:</p>
  
  <pre><code>s=ser.read()
  int(s) 
  </code></pre>
  
  <p>but i can't.The error i take is:</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:\Documents and Settings\User\Desktop\ser1.py", line 24, in &lt;module&gt;
  int(s)
  ValueError: invalid literal for int() with base 10: '' 
  </code></pre>
  
  <p>Do anyone know how to convert it?
  Thanks in advance!</p>