day1/exercise/datestring.py
changeset 386 a0bec380b44f
parent 354 5dc6c3673f9d
child 425 5afcfce15e71
equal deleted inserted replaced
385:c70118cdde66 386:a0bec380b44f
     1 month2mm = { 'JAN': 1, 'FEB': 2, 'MAR': 3, 'APR': 4, 'MAY': 5,
     1 month2mm = { 'JAN': 1, 'FEB': 2, 'MAR': 3, 'APR': 4, 'MAY': 5, 'JUN': 6,
     2 'JUN': 6, 'JUL': 7, 'AUG': 8, 'SEP': 9, 'OCT': 10, 'NOV': 11,
     2 'JUL': 7, 'AUG': 8, 'SEP': 9, 'OCT': 10, 'NOV': 11, 'DEC': 12 }
     3 'DEC': 12 }
       
     4 
     3 
     5 COMMA = ','
     4 COMMA = ','
     6 SPACE = ' '
     5 SPACE = ' '
     7 date_str = raw_input('Enter a date string? ')
     6 date_str = raw_input('Enter a date string? ')
     8 date_str = date_str.replace( COMMA, SPACE)
     7 date_str = date_str.replace( COMMA, SPACE)