Python DOB string manipulation challenge

def main():
    print(raw_input(“What is your DOB? [dd/mm/yy]”)[3:5])


Printing month word:

def main():
    months = [‘january’,’february’,’march’,’april’,’may’,’june’,’july’,’august’,’september’,’october’,’november’,’december’]
    month = int(raw_input(“What is your date of birth? [dd/mm/yyyy]”)[3:5])
    print(str(month) + ” ” + months[month – 1])


Attempt at checking if a month is valid:

def main():
    if 0 < int(raw_input(“What is your DOB? [dd/mm/yy]”)[3:5]) < 12:
        print(“a valid month”)
    else:
        print(“not a valid month”)