#-*- coding:utf-8 -*- import urllib import threading def func(url): status = urllib.urlopen(url).code print status urlinfo = ['http://www.sohu.com','http://www.163.com','http://www.sina.com'] for url in urlinfo: th = threading.Thread(target = func,args = [url]) th.start() th.join() print u'又完事儿了。。'