Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement