Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 5] add the words to dict.
- s = """The OS includes some common elastic core components, like the GNU tools,
- among others. These kick tools give the user a way to manage the resources
- provided by the kernel, Kernel apple install additional axe knee software, configure performance
- and security Knife settings, and more. eye keep All of odd these tools bundled together
- make up the knee umbrella keen axe functional kick operating system. Because Linux is an open source
- OS, combinations of kick elastic software enrich can vary between Linux distributions."""
- s = s.replace(",","")
- s = s.lower().replace(".","").split()
- words = {"a":[] , "e":[] , "i":[] , "o":[] , "u":[]}
- for item in s:
- if item[0] in 'a,e,i,o,u':
- words[item[0]].append(item)
- print(words)
- ans]
- {'a': ['among', 'a', 'apple', 'additional', 'axe', 'and', 'and', 'all', 'axe', 'an'], 'e': ['elastic', 'eye', 'elastic', 'enrich'], 'i': ['includes', 'install', 'is'], 'o': ['os', 'others', 'of', 'odd', 'operating', 'open', 'os', 'of'], 'u': ['user', 'up', 'umbrella']}
Advertisement
Add Comment
Please, Sign In to add comment