title: how can I convert a string to ip address in python
body: <p>how can i convert a string ip address to a decimal number. e.g I have a data <strong>bytes= b'363,3,1778952384,7076'</strong> , here <strong>1778952384</strong> is my ip address and <strong>7076</strong> is my port. How can I convert my IP address to decimal number. below is my code, please help me to solve these problem</p>
  
  <p>/app.py</p>
  
  <pre><code>import socket
  from tornado.tcpclient import TCPClient
  from tornado import gen
  
  @gen.coroutine
  def f(self, message):
  
      global stream
      client = TCPClient()
      stream = yield client.connect('192.168.8.108', 2620, max_buffer_size=int(1e9))
      msg = '192.168.8.101, 8000'.encode('utf-8')
      yield stream.write(msg)
      data = yield stream.read_bytes(21)
      print("bytes=",data) #bytes= b'363,3,1778952384,7076
  </code></pre>