socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

Νικόλαος Κούρας nikos.kouras at gmail.com
Mon Jan 9 17:19:04 EST 2012


Can you please explain me what the [0] in host =
socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0] does at the end?

Why not just host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )
instead? what is the need of [0] ?



More information about the Python-list mailing list