title: Serial readline method in python 3.x
body: <p><a href="https://stackoverflow.com/questions/22275079/pyserial-write-wont-take-my-string">pySerial write() won&#39;t take my string</a></p>
  
  <p>In that post, coders explained how to use the </p>
  
  <blockquote>
    <p>ser.write()</p>
  </blockquote>
  
  <p>method. </p>
  
  <p>I am still wondering how to use the </p>
  
  <blockquote>
    <p>readline()</p>
  </blockquote>
  
  <p>method in python3.x as I want to recieve a float, and compare it in my python 3.x code. I know how to use the readline() in python 2.7. But I am not able to get it working in 3.x.</p>
  
  <pre><code>import serial
  import time
  
  ser=serial.Serial('/dev/ttyACM0', 9600)
  while 1:
      ans = ser.readline()
      print(ans)
      if ans &gt; 25.50:
          print('its getting hot in  here')
      else:
          print('Everything is fine')
  </code></pre>
  
  <p>Thanks in advance</p>