摘要: import sys import pygame pygame.init() size = width, height = 700,700 # 设置窗口 screen = pygame.display.set_mode(size) # 显示窗口 color = (0, 0, 0) # 设置颜色 ba 阅读全文
posted @ 2023-12-28 23:29 sadwqwrqweqw 阅读(34) 评论(0) 推荐(0)
摘要: path = "聊斋志异.txt" file = open(path, "r", encoding="utf-8") text = file.read() file.close() words = jieba.lcut(text) counts = {} for word in words: if 阅读全文
posted @ 2023-12-28 23:20 sadwqwrqweqw 阅读(19) 评论(0) 推荐(0)