selfteaching / selfteaching/selfteaching-python-camp

Day07 模版中的text字符串怎样放在调用模版的main.py

Open
#1,275 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

解释:stats_word.py为模版,main .py为统计中英文词频的程序
如何:被调用的stats_word.py模版封装好不动,text字符串文本在调用模版的main.py里输入?
我觉得text字符串文本(一大段文字字符)应该在调用模版的main.py里,才合理。因为模版就是应该被封装好,直接用的。所以如果每次换了字符串文本时,就应该在main.py里操作。

Screen Shot 2019-03-30 at 05 57 03
Screen Shot 2019-03-30 at 05 57 31
@realcaiying 最棒的教练

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

Read stats_word.py and main.py first to understand how the template is currently used. Run the existing word-frequency program, then verify that the text can be supplied from main.py while stats_word.py remains unchanged. Done means the program still counts Chinese and English word frequencies with a replaceable text input.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
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.