上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 84 下一页
摘要: from bs4 import BeautifulSoup import openpyxl import re import urllib.request import urllib.error # 访问url def ask_url(url): # 伪装浏览器 head = {'User-Agen 阅读全文
posted @ 2020-04-27 13:47 木子欢儿 阅读(646) 评论(0) 推荐(0)
摘要: 2019政府工作报告.txt https://www.lanzous.com/iby44eh 栗子1: import wordcloud import jieba f=open("2019政府工作报告.txt","r",encoding="utf-8") t=f.read() f.close() l 阅读全文
posted @ 2020-04-26 13:21 木子欢儿 阅读(1422) 评论(0) 推荐(0)
摘要: 建议挂梯子安装 栗子1: import wordcloud txt="Life is stort,you need python" c=wordcloud.WordCloud(\ background_color="white") c.generate(txt) c.to_file("1.png") 阅读全文
posted @ 2020-04-26 12:12 木子欢儿 阅读(1297) 评论(0) 推荐(0)
摘要: ls=[[1,2],[3,4],[5,6]]#二维列表 for row in ls: for column in row: print(column) 阅读全文
posted @ 2020-04-26 11:30 木子欢儿 阅读(253) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-04-26 11:08 木子欢儿 阅读(232) 评论(0) 推荐(0)
摘要: 实践 代码: import turtle as t t.title('自动轨迹绘制')#绘制窗口标题栏的标题 t.setup(800,600,0,0)#绘制窗口大小 t.pencolor("red")#画笔颜色 t.pensize(5)#画笔粗细 #数据读取 datals=[]#建立空列表 f=op 阅读全文
posted @ 2020-04-25 17:16 木子欢儿 阅读(1545) 评论(0) 推荐(0)
摘要: 绝对路径和相对路径 写程序要加这个 f=open("D:/MyProject/Python学习/demo.txt","w+") ls=["A","B","C"] f.writelines(ls) f.seek(0)#将指针返回到开头 for line in f: print(line) 阅读全文
posted @ 2020-04-25 17:01 木子欢儿 阅读(197) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-04-25 16:00 木子欢儿 阅读(176) 评论(0) 推荐(0)
摘要: HTML部分: <div class="wrap">Hello,world!</div> CSS部分: @keyframes move { 0% {background-position: 0 0;} 100% { /*宽度固定,如果为百分比背景不会滚动*/ background-position: 阅读全文
posted @ 2020-04-21 12:51 木子欢儿 阅读(1746) 评论(0) 推荐(0)
摘要: 代码: from turtle import * # 无轨迹跳跃 def my_goto(x, y): penup() goto(x, y) pendown() # 眼睛 def eyes(): fillcolor("#ffffff") begin_fill() tracer(False) a = 阅读全文
posted @ 2020-04-19 20:11 木子欢儿 阅读(6699) 评论(0) 推荐(0)
上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 84 下一页