Answer:
months_info = ['January', 'February','March','April', 'May','June', 'July','August', 'September', 'October', 'November', 'December']
date = input('Enter a date using the mm/dd/yyyy format ')
m, d, y = date.split('/')
m = int(m) - 1
name_of_month = months_info[m]
print('{} {}, {}'.format(name_of_month, d, y))
Step-by-step explanation:
- Create a list of all months and store them in the months_info variable.
- Get the date as an input from user and then split the date.
- Finally display the date by following the specific layout using the built-in format method.