Question: transformMonths(string) takes an input string, finds all the proper case references to months of the year, tranforms them to a numerical representation and returns the
transformMonths(string) takes an input string, finds all the proper case references to months of the year, tranforms them to a numerical representation and returns the result.
def transformMonths(string): ### ### YOUR CODE HERE ###
# Example Test Q1e print( transformMonths('I was born on June 24 and my sister was born on May 17') ) # output: 'I was born on 06 24 and my sister was born on 05 17'
print( transformMonths('This is a string without a month in it') ) # output: 'This is a string without a month in it'
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
