title: Python - How can I get just the IP from socket.getpeername()?
body: <p>I am curious to know how you can return ONLY the IP address of the connected user using</p>
  
  <pre><code>ip = socket.getpeername()
  </code></pre>
  
  <p>Because whenever I use that in my server it returns the IP and socket port, I only want the IP, or at least a way to replace the port with Null... I tried using the replace function but that just gives me an error</p>
  
  <pre><code>attributeError: 'tuple' object has no attribute 'replace
  </code></pre>