Last active
August 16, 2017 13:15
-
-
Save nozma/490329f040b7d4a35541049b3af1d0fd 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 | |
| import re | |
| s = input() | |
| # カンマとコンマを除外してから単語毎のリストに分解 | |
| s = re.sub('[,.]', '', s) | |
| s = s.split() | |
| # 文字数をカウントしてリスト化 | |
| result = [] | |
| for w in s: | |
| result.append(len(w)) | |
| print(result) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment