Exercise: Count words
- Create a script called count_words_in_lists.py that given a list of words (for now embedded in the program itself) will count how many times each word appears.
celestial_objects = [
'Moon', 'Gas', 'Asteroid', 'Dwarf', 'Asteroid', 'Moon', 'Asteroid'
]
Expected output:
Moon 2
Gas 1
Asteroid 3
Dwarf 1