擅长:python、mysql、java
<p>您可以轻松展平<code>host</code>:</p>
<pre><code>host = []
for i in range(0, len(sample_text)):
s=sample_text[i]
host += re.findall('[\d]*[.][\d]*[.][\d]*[.][\d]*|[a-z0-9]*[.][a-z]*[.][a-z]*', s)
print(host)
</code></pre>
<p>输出:</p>
<pre><code>['199.72.81.55', 'unicomp6.unicomp.net', '199.120.110.21', 'burger.letters.com', '205.172.11.25']
</code></pre>