Question: aaddresses = 1 2 3 main St . , New York, 1 0 0 0 1 ; 4 5 6 Elm ave., los angeles,

aaddresses ="123 main St., New York, 10001; 456 Elm ave., los angeles, 90001; 789 Broadway, San Francisco, 94111" where each address is in the format "Street Name, City, ZIP Code" and may have inconsistent spacing and uppercase / lowercase characters. Write a Python code that generates and prints the following list:
"123 Main Street, New York, 10001;456 Elm Avenue, Los Angeles, 90001;789 Broadway, San Francisco, 94111" Note that:
Each word is capitalized.
Leading spaces are removed.
"St." is replaced with "Street" and "Ave." is replaced with "Avenue".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!