Question: Write a python program (Dictionaries and complex structure) Write a program that reads from a file called abreviations.txt, a set of abbreviations as shown in
Write a program that reads from a file called abreviations.txt, a set of abbreviations as shown in Figure. 1 and constructs an adequate dictionary for storing them. Your program will then ask the user to enter the name of a file, reads the contents of the file and replace any occurrences of the words on the right of the abbreviation with those on its left. For example, the world "fortunate" becomes "4tun8" 8:ate 2:too 2:to 4: for @:at & and Figure, I: Sample contents of abbreviations.txt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
