Possible Duplicate:
Python extract domain name from URL
I'm thinking about the best way to get a naked domain from an host.
def naked_domain(host):
"""Returns a naked domain from an host.
Doctests:
>>> naked_domain("google.com")
'google.com'
>>> naked_domain("www.google.com")
'google.com'
>>> naked_domain("xxx.www.google.com")
'google.com'
"""
pass