title: I can not change data receive from socket into integer. I get this error "invalid lateral for int () with base 10"
body: <p>I try to convert my variable data to integer .. i get this error "invalid lateral for int () with base 10" Thanks for help</p>
  
  <pre><code>import socket
  import random
  import re
  import struct
  def netcat(hostname, port):
      f= open("words.txt", "rb")
      l =f.readlines()
      i=0
      s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      s.connect((hostname, port))
      i=0
      while True:
          data = s.recv(2048)
          data=data.decode("utf-8")
          if data == "":
              break
          while int(data)&lt;6:# my error 
              content=random.choice(l)
              print("sending: ",content)
              s.sendall(content)
              print ("the number of correct words: ", data)
      print ("Connection closed.")
      s.close()
  </code></pre>