title: Python - UDP client
body: <p>I am currently reading a Python <a href="https://www.nostarch.com/blackhatpython" rel="nofollow">book</a> and came across the following example:</p>
  
  <pre><code>import socket
  target_host = "127.0.0.1"
  target_port = 80
  
  # create a socket object
  client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  
  # send some data
  client.sendto("AAABBBCCC",(target_host,target_port))
  
  # receive some data
  data, addr = client.recvfrom(4096)
  
  print data
  </code></pre>
  
  <p>If I understood it right, I am building a listener to my own loop-back IP address on the UDP port 80. My question is, what is it good for and how I can "test" it? (Meaning how can I read the sent "AAABBBCCC")?</p>
  
  <p>Thanks </p>