I've got a list that contain a bunch of information, including the FQDN of a host.
host_data=['foo.example.com', 'other unimportant data'] I need to seperate the hostname from the domain name. This is how I'm doing it, and it work, but it seems *really* hacky. Is there a better (or more pythony) way? hostname=host_data[0].split(".")[0] domain=".".join(host_data[0].split(".")[1:]) Thanks, Ben _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor