From 97ed3a4adfb83ee202827d0d0843c9f1721c2911 Mon Sep 17 00:00:00 2001 From: pbr4nzfkh <18879212807@163.com> Date: Wed, 13 Mar 2024 14:18:36 +0800 Subject: [PATCH] =?UTF-8?q?Delete=20'=E5=9F=BA=E6=9C=AC=E7=BB=93=E6=9E=84/?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=9C=BA/81B.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 基本结构/状态机/81B.py | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 基本结构/状态机/81B.py diff --git a/基本结构/状态机/81B.py b/基本结构/状态机/81B.py deleted file mode 100644 index 1746beb..0000000 --- a/基本结构/状态机/81B.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -import cppy.cp_util as util - -# 每一列是一个数据元素和一个公式,第一列是输入数据,所以没有公式 -all_words = [(), None] -non_stop_words = [(), util.extract_str_words] -frequencies = [(), util.get_frequencies] -sorted_data = [(), util.sort_dict] - -# 整个电子表格 -all_columns = [all_words, non_stop_words,\ - frequencies, sorted_data] - -# 每次输入数据后调用此方法 -def update(): - global all_columns - for c in all_columns[1::]: - if c[1] == util.extract_str_words: - c[0] = c[1](all_words[0]) - elif c[1] == util.get_frequencies: - c[0] = c[1](non_stop_words[0]) - elif c[1] == util.sort_dict: - c[0] = c[1](frequencies[0]) - -# 将固定数据加载到第一列中 -all_words[0] = util.read_file(util.testfilepath) -# 调用update函数遍历列表 -update() - -#打印结果 -util.print_word_freqs(sorted_data[0]) - -