Last active
August 17, 2017 12:16
-
-
Save nozma/e3f8bb42139c6d20f357a3df679ae851 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
| # coding: utf-8 | |
| s = 'Now I need a drink, alcoholic of course, after the heavy lectures involving quantum mechanics.' | |
| # 単語毎のリストに分解してから,.を除外し文字数をカウント | |
| result = [len(w.rstrip(',.')) for w in s.split()] | |
| print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment