Commit a8108957 by BellCodeEditor

auto save

parent a201aaac
Showing with 6 additions and 1 deletions
j.png

80.6 KB

import wordcloud import wordcloud
from PIL import Image
import numpy
with open("python二级考试大纲.txt","r",encoding="utf-8")as f: with open("python二级考试大纲.txt","r",encoding="utf-8")as f:
a=f.read() a=f.read()
img=Image.open("bell.png")
data=numpy.array(img)
w=wordcloud.WordCloud(background_color="blue",font_path="SimHei.ttf") w=wordcloud.WordCloud(background_color="blue",font_path="SimHei.ttf")
w.generate("a") w.generate(a)
w.to_file("j.png") w.to_file("j.png")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment