列表我使用的模塊pythonwhois得到許多條目的特定域列表:遍歷在Python
def whois(self):
host = str(self.EntryText.get().lstrip("http://www."))
whois = pythonwhois.net.get_whois_raw(host)
print whois
whois
上述返回條目喜歡的列表如下:
[u「域名:google.com \ n註冊域名ID:\ n註冊商WHOIS服務器:whois.markmonitor.com \ n註冊商網址:http://www.markmonitor.com \ n更新日期:2014-05-19T04:00:17-0700 \ n創建日期:1997- 09-15T00:00:00-0700 \ n註冊處註冊到期日:2020-09-13T21:00:00-0700 \ n
我的問題是:我如何迭代列表並將結果打印在一個優雅的人類可讀列表中?