【统计-ch2】

本文探讨了变量之间的关联性,通过散点图展示定量变量的关系,并解释了线性、曲线和集群等不同形式的关系。重点阐述了正负关联的概念、相关系数的计算及其在标准化数据集中的应用。此外,介绍了回归线的概念,包括最小二乘法和其在预测中的作用,同时讨论了残差、离群点和非线性关联的影响。最后,强调了在分析中识别潜在混淆变量的重要性。

1. ASSOCIATION BETWEEN VARIABLES

Two variables measured on the same cases are associated if knowing the
value of one of the variables tells you something about the values of the

other variable that you would not know without this information.


2. scatterplot

A scatterplot shows the relationship between two quantitative variables
measured on the same individuals.


3.

Form: Linear relationships, where the points show a straight-line pattern, are
an important form of relationship between two variables. Curved relationships
and clusters are other forms to watch for.
Direction: If the relationship has a clear direction, we speak of either positive
association (high values of the two variables tend to occur together) or negative
association (high values of one variable tend to occur with low values of
the other variable).
Strength: The strength of a relationship is determined by how close the points
in the scatterplot lie to a simple form such as a line.


4.The standardized height says how many standard deviations above or below the mean
a person’s height lies.

The formula for correlation helps us see that r is positive when there is a positive
association
between the variables. Height and weight, for example, have
a positive association. People who are above average in height tend to also be
above average in weight. Both the standardized height and the standardized
weight for such a person are positive. People who are below average in height
tend also to have below-average weight. Then both standardized height and
standardized weight are negative.

5.

Correlation requires that both variables be quantitative, so that it makes sense to do the arithmetic indicated by the formula for r.

Positive r indicates positive association between the variables, and negative r indicates negative association.

Correlation measures the strength of only the linear relationship between two variables. Correlation does not describe curved relationships between vari-ables, no matter how strong they are.

Like the mean and standard deviation, the correlation is not resistant: r is strongly affected by a few outlying observations


6.regression line

A regression line is a straight line that describes how a response variable
y changes as an explanatory variable x changes. We often use a regression
line to predict the value of y for a given value of x. Regression,
unlike correlation, requires that we have an explanatory variable and a
response variable.


7.LEAST-SQUARES REGRESSION LINE

The least-squares regression line of y on x is the line that makes the
sum of the squares of the vertical distances of the data points from the
line as small as possible.


8.

y = b0 + b1x

b1 = r sy / sx

b0 = y − b1x

The slope and intercept of the least- squares line depend on the units of measurement—you can’t conclude anything
from their size.

We can describe regression entirely
in terms of the basic descriptive measures x, sx, y, sy, and r. If both x and y are
standardized variables, so that their means are 0 and their standard deviations
are 1, then the regression line has slope r and passes through the origin.


The square of the correlation, r2, is the fraction of the variation in the
values of y that is explained by the least-squares regression of y on x.  多少人是符合这个关系的。

the residuals from the least-squares line have a special property: the mean of the
least-squares residuals is always zero.


An outlier is an observation that lies outside the overall pattern of the
other observations. Points that are outliers in the y direction of a scatterplot
have large regression residuals, but other outliers need not have
large residuals.


We did not need the distinction between outliers and influential observations
in Chapter 1. A single large salary that pulls up the mean salary x for a
group of workers is an outlier because it lies far above the other salaries. It is
also influential because the mean changes when it is removed. In the regression
setting, however, not all outliers are influential. Because influential observations
draw the regression line toward themselves, we may not be able to spot
them by looking for large residuals.???


Correlation measures only linear association, and fitting a straight line makes
sense only when the overall pattern of the relationship is linear


Correlation and least-squares regression are not resistant


LURKING VARIABLE
A lurking variable is a variable that is not among the explanatory or
response variables in a study and yet may influence the interpretation of
relationships among those variables.


2.

When both variables are
two-way table categorical, the raw data are summarized in a two-way table that gives counts
of observations for each combination of values of the two categorical variables.

<think>嗯,用户想用Python处理一个文本文件,有两个主要任务:一是把所有大写字母转成小写并保存,二是统计两个指定小写字母之间的字符数量。我需要仔细分析这两个需求,然后一步步解决。 首先,关于第一个任务,把大写转成小写。根据之前的引用,用户之前的问题是关于大小写转换的,但这次是要单向转换,而不是互换。之前的例子用了swapcase,但这里需要的是只转大写到小写。所以应该使用lower()方法。不过,用户可能希望保持原文件中的小写字母不变,只转换大写部分。不过根据问题描述,任务1是“将所有大写字母转换为小写并保存”,所以整个文件中的大写字母变成小写,而原本的小写字母保持不变?或者是否是将所有字母转成小写?这里可能需要澄清。但根据用户的问题,任务1明确是“将所有大写字母转换为小写”,所以可能只是将大写转小写,其他字符不变。例如,'Hello'变成'hello',而原本的'l'还是小写。但通常,将大写转小写可能是指整个文件转为小写,比如使用lower()方法。这个时候可能需要确认用户的需求。但根据问题描述,用户说的第一个任务是“将所有大写字母转换为小写并保存”,所以可能只需处理大写字母,将其转为小写,而小写字母保持原样?或者用户是否想要将所有字母转为小写?比如,如果原文件是混合大小写,结果全部变成小写。例如,原文件是'AbC',处理后变成'abc'。这个时候应该用lower()方法。 这里可能存在歧义。需要再仔细看问题。用户的问题1是“将所有大写字母转换为小写并保存”,而任务2是输入两个小写字母,统计之间的字符。所以可能任务1是只转大写字母到小写,其他字符不变。例如,原文件中的小写字母保持不变。或者用户是否是想将整个文件转为小写?例如,不管原来是大写还是小写,全部转为小写?这需要明确。例如,原文件中的小写字母是否需要改变?比如,原文件中的小写字母是否需要变成小写?这可能没有意义,所以可能用户的意思是,将所有的大写字母转为小写,而原本的小写的保持不变。但这样的话,例如,原文件中的'A'变为'a',而原文件的'a'还是'a'。这似乎可能。但通常情况下,可能用户是希望将整个文本转为小写,即所有字母都是小写。这时候应该用str.lower()方法,这样不管原来是大写还是小写,都转为小写。例如,原文件是'Hello World',处理后是'hello world'。这个时候,任务1应该使用lower()方法。但根据用户的问题描述,第一个任务明确是“将所有大写字母转换为小写”,可能意味着只处理大写字母,所以其他字符(如小写字母、数字、符号)保持不变。这个时候,正确的处理方式应该是遍历每个字符,如果该字符是大写,则转为小写,否则保留。例如: 转换后的字符 = 原字符.lower() if 原字符.isupper() else 原字符 这样,小写字母和其他字符不会被改变。但可能用户的实际需求是希望整个文本转为小写,这时候应该直接调用lower()。这个时候需要根据用户的问题来判断。例如,如果用户的问题中的任务1是“将所有大写字母转换为小写”,那么可能是将每个大写字母单独处理,而其他字符不变。比如,原文件中的小写字母保持不变,大写字母转为小写。但可能用户实际想要的是将所有字母转为小写,所以更可能的情况是后者,也就是整个文本转为小写。这需要进一步确认,但根据问题描述,用户明确说“将所有大写字母转换为小写”,所以可能只需要处理大写字母,其他保持不变。例如,原文件中的'AbC'变成'abC'吗?这似乎不太合理。或者用户可能打错了,是希望将大写转小写,同时将小写转大写?但根据用户的问题,任务1的描述是明确的。可能需要按照用户的问题来处理,即只将大写字母转为小写,其他字符不变。这种情况下,需要逐个字符判断,如果是大写,就转小写,否则保留。 但根据用户的第二个任务,输入两个小写字母ch1和ch2统计文件中位于这两个小写字母之间的字符数量。这说明在任务1处理后的文件中,存在小写字母,因为ch1和ch2是小写字母。因此,可能用户的任务1是仅处理大写字母转为小写,而原本的小写字母保持不变。这可能吗?或者任务1处理后,所有字母都是小写,这样任务2统计才能正确进行。比如,如果任务1处理后整个文件都是小写,那么ch1和ch2作为小写字母,统计它们之间的字符才有意义。否则,原文件可能还有其他大写字母,在任务1处理后变成小写,这样任务2统计时需要处理小写后的情况。这时候,任务1的处理应该是将整个文件转为小写,这样任务2统计可以基于小写后的文件。因此,可能用户的任务1其实是要求将所有字母转为小写,也就是无论原是大写还是小写,都转为小写。这样,任务1的处理方法就是使用lower()方法,将整个字符串转为小写。例如: content = f.read() lower_content = content.lower() 然后保存这个lower_content到新文件。这样处理后,所有的字母都是小写的,这样任务2中的ch1和ch2是小写字母,统计它们之间的字符就只需要在小写环境中进行。 现在来看用户提供的引用,之前的引用中处理的是大小写互换,用的是swapcase。但用户这次的需求不同,所以可能需要调整方法。 对于任务2统计两个指定小写字母之间的字符数。需要注意,这里的“之间”可能指的是在两个字符之间的所有字符,包括这两个字符出现的位置之间的字符。例如,在字符串中,找到所有ch1和ch2的出现位置,然后计算它们之间的字符数量。但用户的具体需求可能需要更明确的定义。例如,可能用户的意思是,在整个文件中,每出现一次ch1后,直到下一个ch2出现之前的字符数目。或者统计所有ch1和ch2之间的字符的总数。或者,统计所有位于ch1和ch2之间的字符,无论顺序。需要明确统计的条件。 可能用户的意思是,统计在文本中出现的所有位于ch1和ch2之间的字符的数量。例如,对于每个字符,如果在某个ch1之后且在下一个ch2之前出现,则计数。或者,可能用户想要的是,在文本中,每两个连续的ch1和ch2之间的字符数,或者所有出现在ch1和ch2之间的字符的总数。这里可能需要进一步明确,但根据用户的问题描述,可能正确的理解是统计在文件中所有位于ch1和ch2之间的字符的数量,即每当遇到一个ch1,就开始计数,直到遇到下一个ch2,然后将这之间的字符数目累加,或者统计总共有多少个字符位于这样的ch1和ch2之间。 例如,假设文本是abcde,ch1是a,ch2是e,那么中间的字符是b、c、d,数目是3。或者,如果是a之后到e之前的所有字符,包括a和e之间的所有字符。或者,可能用户的意思是,统计在两个指定小写字母之间的所有字符的数量,不管顺序,例如,在ch1和ch2之间的每个字符都被计数一次。或者,可能是统计在文本中每个ch1后面直到遇到ch2的字符数目之和。 这可能需要更多的例子来理解。例如,如果文本是"aXbYc",ch1是a,ch2是b,那么中间的字符是X,数目是1。而如果文本是"aXbYaZb",那么可能有多个区间。比如,第一个a到b之间有X,第二个a到下一个b之间有 Z,所以总共有1+1=2个字符?或者可能需要统计每个ch1和之后第一个ch2之间的字符数,然后总和。 因此,在实现时,可能需要遍历文件内容,当找到一个ch1时,开始计数,直到遇到下一个ch2,并累加这之间的字符数目(或者统计字符的数量,包括或排除ch1和ch2)。这需要用户明确,但根据用户的问题描述,可能需要统计ch1出现后到下一个ch2出现前的所有字符的数量,包括这两个字符之间的所有字符,但不包括ch1和ch2自己?或者包括? 例如,用户可能需要统计的是在两个小写字母ch1和ch2之间的字符数。例如,对于文本中的每一个连续的ch1和ch2对,统计它们之间的字符数。例如,如果文本是"a123b",则统计a和b之间的字符数为3。这可能是一个常见的需求,比如统计两个特定标记之间的字符数。 因此,可能的实现步骤是: 1. 处理文件,将大写转为小写,保存到新文件。 2. 读取处理后的文件内容,转换为全小写(或者在处理后的文件中已经全小写)。 3. 用户输入两个小写字母ch1和ch2。 4. 遍历处理后的内容,找到所有ch1的位置,然后找到每个ch1之后的下一个ch2的位置,计算两者之间的字符数,并累加。 或者,可能需要统计所有出现在ch1和ch2之间的字符的总数,而不管顺序。例如,每当出现一个ch1,之后出现的所有字符直到遇到ch2都会被计数,而不管中间是否有其他ch1或ch2。这种情况下,可能需要状态机的方式,当处于ch1之后的区域时,开始计数,直到遇到ch2时停止,并将计数累加。 比如,初始状态是未找到ch1。当找到ch1时,进入计数状态,开始计数每个字符(包括其他字符),直到遇到ch2,此时将当前计数值累加到总和,并重置计数状态。如果再次遇到ch1,则重新开始计数。例如: sum = 0 counting = False current_count = 0 遍历每个字符: if not counting and char == ch1: counting = True elif counting and char == ch2: sum += current_count current_count = 0 counting = False elif counting: current_count +=1 或者,这可能统计的是每个ch1和后续ch2之间的字符数,不包括ch1和ch2本身。例如,"a123b"中的字符数是3。这可能符合用户的需求。 但用户的问题描述是“统计文件中位于ch1和ch2之间的字符数量”,所以可能需要明确是否包括边界。假设用户需要统计的是在ch1之后和ch2之前的所有字符的数量,不包含ch1和ch2。例如,如果文本是"aXbYc",ch1是a,ch2是b,那么中间的X会被计数,数目为1。而如果文本中有多个这样的对,比如"aXbYaZb",则两个区间X和Z,总共有1+1=2。 因此,在代码实现中,需要处理这种情况:每次遇到ch1后,开始记录,直到遇到ch2,将之间的字符数累加,然后继续寻找下一个ch1。 现在,根据用户的问题,需要将任务分解: 步骤一:处理文件,将所有大写转为小写并保存。这一步需要读取原文件,处理后将结果保存到新文件,或者覆盖原文件?用户可能希望保存到新文件,避免覆盖原文件。例如,保存为原文件名加上“_lowercase”后缀。或者用户可能希望覆盖原文件?但根据常规做法,可能建议保存到新文件。 步骤二:统计两个小写字母之间的字符数。这需要用户输入ch1和ch2,然后处理转换后的文件,统计所有位于ch1和ch2之间的字符数量。 现在,代码部分: 对于任务一,正确的处理方式是将所有大写字母转为小写,而小写字母保持不变?或者将整个文件转为小写?根据用户的问题描述,任务一明确是“将所有大写字母转换为小写”,所以可能只是将大写转为小写,而小写保持原样。例如,原文件中的小写字母保持不变,而大写转为小写。但这样的话,在任务二中,用户需要输入两个小写字母,统计它们之间的字符数,这可能更复杂,因为原文件中的小写字母可能和转换后的字母混合。例如,原文件中有大写A和小写a,转换后的文件中的a可能来自原来的A或者原来的a。但用户可能希望任务二是在处理后的文件中统计,即处理后的文件中所有字母都是小写的情况下统计。或者,可能用户的任务一实际上是希望将所有字母转为小写,即不论原是大写还是小写,都转为小写。这个时候整个文件都是小写的,任务二中的ch1和ch2输入是小写字母,统计它们之间的字符数就更容易。 这个时候,可能用户的问题中的任务一可能存在笔误,或者需要进一步澄清。但根据用户给出的需求描述,可能正确的处理方式是将所有大写字母转为小写,其他字符不变。例如,原文件中的小写字母保留,大写字母转为小写。或者用户可能想要的是将所有字母转为小写,不管原是大写还是小写。比如,如果原文件是混合大小写,转换后全部小写。这个时候,使用lower()方法即可。例如: lower_content = original_content.lower() 这样处理后,整个文件中的字母都是小写的,这样在任务二中,用户输入的ch1和ch2是小写字母,统计它们之间的字符数就可以在全部小写的环境中进行。 因此,可能正确的做法是任务一使用lower()方法,将整个文件转为小写,然后保存。然后任务二中,统计转换后的文件中的ch1和ch2之间的字符数。 现在,具体实现: 任务一: 读取原文件内容,转为小写,保存到新文件。例如: with open('input.txt', 'r') as f: content = f.read() lower_content = content.lower() with open('output.txt', 'w') as f: f.write(lower_content) 任务二: 用户输入ch1和ch2(小写字母),然后统计在转换后的文件中,位于ch1和ch2之间的字符数。这里需要确定统计方式。例如,每次遇到ch1,开始计数,直到遇到下一个ch2统计之间的字符数(不包括ch1和ch2)。 例如,转换后的内容为 'abacdaeb',ch1='a',ch2='b'。则: 第一个a在位置0,之后第一个b在位置1,之间的字符数是0(因为直接a后就是b,没有中间字符)。第二个a在位置2,之后第一个b在位置5,中间有'cdae',其中从a到b之间是 'cda',即位置3到5的字符是 c, d, a, e?或者需要明确范围。可能用户的需求是,统计每个ch1出现后,到下一个ch2出现前的字符数目,总和。比如,在字符串中,每当出现ch1,就寻找下一个出现的ch2,然后统计这两个之间的字符数目,然后将所有这些数目相加。 例如,字符串为 'aXbYaZb',转换后是 'axbyazb'。如果ch1是 'a',ch2是 'b',那么第一个a在0,下一个b在2,中间有x(数目1)。第二个a在5,下一个b在7,中间有z(数目1)。总和是1+1=2。 因此,实现方式可以是遍历转换后的内容,每当找到ch1时,记录开始位置,然后继续查找下一个ch2,并计算中间的字符数目。如果找到ch2,则累加到总数,否则忽略(比如,没有对应的ch2)。 代码实现思路: def count_chars_between(content, ch1, ch2): total = 0 i = 0 n = len(content) while i < n: if content[i] == ch1: # 找到ch1,开始寻找下一个ch2 start = i j = i + 1 found = False while j < n: if content[j] == ch2: # 计算中间的字符数目:j - start -1 total += (j - start -1) i = j # 下一次从j+1开始 found = True break j +=1 if not found: # 没有找到对应的ch2,不计入总数 i +=1 else: i +=1 return total 这可能是一种实现方式。例如,在字符串 'aXbYaZb' 转换后的内容为 'axbyazb',调用count_chars_between('axbyazb', 'a', 'b'),则第一个a在0,找到b在2,中间数目是2-0-1=1。第二个a在4(注意原字符串转换后的索引可能需要重新确认),假设转换后的字符串是 'axbyazb',则索引0:a, 1:x, 2:b, 3:y, 4:a, 5:z, 6:b。所以,第二个a在4,找到b在6,中间数目是6-4-1=1。总和为2。 这可能符合用户的需求。 因此,将这两个步骤结合起来,完整的代码可以如下: 步骤一:转换并保存文件。 步骤二:读取转换后的文件内容,并统计字符数目。 现在,编写Python代码: 1. 转换大写到小写并保存: input_file = 'input.txt' output_file = 'output_lower.txt' with open(input_file, 'r') as f: content = f.read() lower_content = content.lower() with open(output_file, 'w') as f: f.write(lower_content) 2. 统计两个小写字母之间的字符数目: def count_chars_between(content, ch1, ch2): total = 0 i = 0 n = len(content) while i < n: if content[i] == ch1: # 找到ch1,寻找下一个ch2 j = i + 1 while j < n: if content[j] == ch2: # 中间有j - i -1 个字符 total += (j - i -1) i = j # 下一次从j开始,避免重复计数 break j +=1 # 无论是否找到,i递增到j的位置,或者在循环结束后i自增 i = j else: i +=1 return total # 用户输入ch1和ch2 ch1 = input("请输入第一个小写字母ch1: ").strip().lower() ch2 = input("请输入第二个小写字母ch2: ").strip().lower() # 读取处理后的文件内容 with open(output_file, 'r') as f: processed_content = f.read() count = count_chars_between(processed_content, ch1, ch2) print(f"文件中共有{count}个字符位于{ch1}和{ch2}之间") 但需要注意,用户输入的ch1和ch2需要是小写字母,并且要验证输入的有效性。例如,检查输入是否为单个小写字母。 此外,函数count_chars_between可能需要处理多个ch1和ch2的情况。例如,如果ch1和ch2相同的情况?或者如果ch1或ch2不是字母?这些可能需要错误处理。 例如,在用户输入时,添加验证: while True: ch1 = input("请输入第一个小写字母ch1: ").strip().lower() if len(ch1) == 1 and ch1.isalpha(): break else: print("输入无效,请重新输入单个小写字母") 同样处理ch2。 综合以上分析,最终的代码应该包括: - 转换大写到小写并保存到新文件。 - 输入验证确保ch1和ch2是单个小写字母。 - 统计两个字符之间的数目。 现在,将这些步骤整合到代码中: 处理文件转换部分: input_filename = 'original.txt' output_filename = 'converted.txt' # 读取原文件并转换大写字母为小写 with open(input_filename, 'r') as file: original_content = file.read() converted_content = original_content.lower() # 将所有字母转为小写 with open(output_filename, 'w') as file: file.write(converted_content) 统计部分: def count_between_chars(content, start_char, end_char): count = 0 i = 0 n = len(content) while i < n: if content[i] == start_char: # 找到起始字符,寻找结束字符 j = i + 1 while j < n: if content[j] == end_char: # 统计i+1到j-1之间的字符数 count += (j - i -1) i = j # 移动i到j的位置,继续后续搜索 break j += 1 # 如果未找到结束字符,继续移动i if j >= n: i +=1 else: i +=1 return count # 获取用户输入并验证 while True: ch1 = input("请输入第一个小写字母ch1: ").strip().lower() if len(ch1) == 1 and ch1.isalpha(): break print("输入无效,请确保输入一个字母字符。") while True: ch2 = input("请输入第二个小写字母ch2: ").strip().lower() if len(ch2) == 1 and ch2.isalpha(): break print("输入无效,请确保输入一个字母字符。") # 读取转换后的内容 with open(output_filename, 'r') as file: converted_content = file.read() # 统计字符数 total = count_between_chars(converted_content, ch1, ch2) print(f"在转换后的文件中,位于'{ch1}'和'{ch2}'之间的字符共有{total}个") 这样,整个代码实现就完成了。需要注意的是,函数count_between_chars的逻辑是否正确。例如,当找到一个ch1后,会寻找下一个ch2统计中间的字符数,并移动i到j的位置,避免重复处理中间的字符。例如,如果内容为 'ababa',ch1='a', ch2='a',则第一个a在0,找到下一个a在2,中间有一个字符,数目1。然后i移动到2,下一个a在4,中间有一个字符,数目1。总共有2个字符。这可能符合预期。 另一个测试案例:内容为 'a123b', ch1='a', ch2='b',统计数目为3(字符1、2、3)。 因此,函数是正确的。 最后,用户的问题中的引用部分是关于大小写互换的,但当前任务是转换大写到小写,所以之前的引用可能只是作为参考,但实际处理方式不同。例如,使用lower()而不是swapcase()。 综上所述,代码实现正确,满足用户的需求。</think>以下是分步骤的Python实现方案: ### 一、大写转小写并保存 ```python def convert_upper_to_lower(input_file, output_file): with open(input_file, 'r') as f: content = f.read() # 全部转为小写字母 lower_content = content.lower() with open(output_file, 'w') as f: f.write(lower_content) print(f"文件已保存至:{output_file}") ``` ### 二、统计字符区间数量 ```python def count_between_chars(input_file, ch1, ch2): with open(input_file, 'r') as f: content = f.read() total = 0 i = 0 while i < len(content): if content[i] == ch1: # 找到起点后开始找终点 j = i + 1 while j < len(content): if content[j] == ch2: total += (j - i - 1) # 计算中间字符数 i = j # 跳过已统计区间 break j += 1 i += 1 return total ``` ### 三、完整调用示例 ```python # 文件路径配置 input_filename = "original.txt" output_filename = "converted.txt" # 执行转换 convert_upper_to_lower(input_filename, output_filename) # 获取用户输入并验证 while True: ch1 = input("请输入第一个小写字母: ").strip().lower() if len(ch1) == 1 and ch1.isalpha(): break while True: ch2 = input("请输入第二个小写字母: ").strip().lower() if len(ch2) == 1 and ch2.isalpha(): break # 统计并输出结果 result = count_between_chars(output_filename, ch1, ch2) print(f"字符'{ch1}'与'{ch2}'之间的字符数量为:{result}") ``` ### 实现原理说明 1. **字符转换**:通过`str.lower()`方法实现全文字母小写化[^1] 2. **区间统计**:采用双指针算法,时间复杂度为$O(n)$ - 当找到`ch1`时启动计数器 - 遇到`ch2`时计算两者间距 - 支持处理多个区间的情况 ### 数学表达 统计公式可表示为: $$ \text{Total} = \sum_{i=0}^{n-1} \sum_{j=i+1}^{n-1} [ (C_i = ch1) \land (C_j = ch2) ] \times (j-i-1) $$ 其中$C_i$表示第i个字符,$\land$表示逻辑与运算 ### 注意事项 1. 原始文件需与脚本在同一目录 2. 统计结果包含所有空格、标点等可见字符 3. 空文件时统计结果为0 --相关问题-- 1. 如何批量处理多个文件的大小写转换? 2. 如果要排除标点符号的统计应如何修改代码? 3. 如何统计特定单词之间的字符数量?
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值