
Size: a a a
time_dict = {
'SEC': exec('seconds = int(input_period[0])'),
'MIN': exec('minutes = int(input_period[0])'),
'HRS': exec('hours = int(input_period[0])'),
'DAY': exec('days = int(input_period[0])'),
'MTH': exec('days = int(input_period[0])*30'),
'YRS': exec('days = int(input_period[0])*365'),
}
ptrn = r"(?<=<type\s')\w+(?='>)"
txt = r"<type 'int'> "
re.match(ptrn, txt).group()