Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Scrabble Time

Instruction

Great! The file dictionary.txt contains a dictionary of English words sorted alphabetically. Each word is in a separate line:

aa
aah
aahed
...

We would like to read this file and analyze it using Python. Here's a reminder of how you can read a file and put each line of this file in a list:

with open(file, 'r') as f:
  data = f.read()
  lines_list = data.splitlines()

Exercise

Write a get_dictionary_words() function that takes a filename as an argument and returns the list of words in this file. Each word in the file is on a separate line.