摘要:
from wordcloud import WordCloud import matplotlib.pyplot as plt import jieba # 生成词云 def create_word_cloud(filename): with open('hongloumong.txt',encod 阅读全文
摘要:
一、python字符串替换可以用两种方法实现: 1.用字符串本身的方法 2.用正则来替换字符串 下面用个例子来实验: a = 'hello word' 我把a字符串里的word替换为python 1.用字符串本身的replace方法 a.replace('word' , 'python') 输出结果 阅读全文