【发布时间】:2021-04-27 12:46:46
【问题描述】:
我需要一些帮助来查找单词的长度以及有多少单词具有表格的长度。例如,如果句子是“我要买一辆新自行车。”,
输出将是
| Length of Word | How Many Words In The Text In This Length |
|---|---|
| 1 | 1 |
| 3 | 2 |
| 4 | 1 |
【问题讨论】:
-
第二行第二列2。当只有2个长度为3的单词时。不应该是1吗?
标签: python string list function dictionary