How to use python
This article mainly explains "how to use python". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to use python.
From urllib.request import *
From string import ascii_lowercase as al
Def urliter (): for i in range (100): print ("% d yield 100"% I) for j in al: for k in al: yield "http://www.d%c%c%c%c.com"% (I, j, k, j, k)
Logfile = open (filepath, "w", encoding='utf-8')
For u in urliter (): try: wp = urlopen (u) print ("find" + u) logfile.write (u + "\ n") except: pass
Logfile.close () Thank you for your reading, the above is the content of "how to use python". After the study of this article, I believe you have a deeper understanding of how to use python, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!