How to use Python to capture the heart of the goddess in 520s
This article mainly explains how to use Python to capture the heart of the goddess in 520. the content of the explanation 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 to capture the heart of the goddess on 520.
Draw love with one line of code
This coquettish operation does not know how many people are tempted to learn python, in fact, if the code is really written like that, it is best to bring your own level 3 head after work at night, otherwise it is easy to get stuck. The code is as follows:
Print ('\ n'.join (['.join) ([(' LovePython' [(Xmury)] if ((xxxu0.05) * * 2 + (yellow0.1) * * 2-1) * * 3-(xpend0.05) * * 2* (yellow0.1) * * 3 = 5 and (row-5) < col < (13-row): return True
The final effect is as follows:
As you can see, because I only used 37 pictures, there will be some random repeated pictures, if you use them, you can choose more photos, the effect will be better!
Package as an exe file
Now that the tool has been written, it is of course convenient for those who do not have a python environment to use it. Using the pyinstaller packaging tool, you do not need to rely on the python environment. Double-click exe to enter the image storage address to complete the drawing of the heart-shaped photo wall:
Thank you for your reading, the above is the content of "how to use Python to capture the heart of the goddess in 520". After the study of this article, I believe you have a deeper understanding of the problem of how to use Python to capture the heart of the goddess in 520. 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!