Write a program that replaces the name of each month with its three-letter abbreviation. Save it asmonths.py.
a) Create a list.
months = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december']
b) Use a for loop to update and store each month with its three-letter abbreviation into a new list.
c) Print the value of each month in a row separated by a '|' as displayed in the output example.
d) Print the new list as displayed in the output example.
e) Print the original list as displayed in the output example.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here