24
I have a link such as http://www.techcrunch.com/ and I would like to get just the techcrunch.com part of the link. How do I go about this in python?
I have a link such as http://www.techcrunch.com/ and I would like to get just the techcrunch.com part of the link. How do I go about this in python?
This worked for my purposes. I figured I'd share it.
".".join("www.sun.google.com".split(".")[-2:])