selfteaching / selfteaching/selfteaching-python-camp

Day07 汉字与英语词汇遍历统计的不同

Open
#1,266 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
151
Forks
875
PR merge metrics
No merged PRs in 30d

Description

在统计汉字与英语词汇的不同的时候,要注意的是英语词汇以空格为区分,而汉字是不需要空格断开每一个字的。
英语字符串列表遍历词汇需要空格区分:
text_en_str = text_string.split(" ")
for text_en in text_en_str :

英语字符串列表字符没有空格,遍历的结果是得到每个字母:
for text_en in text_en_str :

汉字字符串列表可以直接遍历每个汉字:
for text_cn in text_cn_str :

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Day07 lesson material referenced by the issue and read the surrounding Chinese and English vocabulary examples. Check how the examples explain splitting English text versus iterating Chinese characters. Done means the lesson clearly distinguishes word-level English iteration from character-level iteration and preserves the shown Python behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.