Created
October 20, 2021 17:04
-
-
Save JIElite/0b84d2fb8194e83a068f52fade806bef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for line in fd: | |
| words = [] | |
| if line: | |
| # 這邊就可以照您說的方法做 | |
| tmp = "" | |
| for c in line: | |
| if 'a'<= c <='z': | |
| tmp = tmp + c | |
| elif tmp: | |
| words.append(tmp) | |
| tmp = "" | |
| if tmp: | |
| words.append(tmp) # 'abc,cde,abc' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment