Please help to correct my humble code. Social security number validation : I am trying to validate ssn, that should be in format: xxxCd1d2m1m2y1y2. "xxx" are consecutively assigned digits, "C" is the checksum digit, "dd" donates the day, "mm" the month and "yy" the year of birth.
    
    c == (x1*3 + x2*7 + x3*9 + d1*5 + d2*8 + m1*4 + m2*2 + y1*1 + y2*6) % 11
Here is what i've got so far:
    
    from datetime import datetime

    def is_valid(digit_list):
        ssn=list(digit_list)
        x1, x2, x3, c, d1, d2, m1, m2, y1, y2 = [int(digit) for digit in digit_list]
        date=digit_list[4:]
            
        if len(ssn) == 10 and c == (x1*3 + x2*7 + x3*9 + d1*5 + d2*8 + m1*4 + m2*2 + y1*1 + y2*6) % 11 and date==datetime.strptime(date,'%d%m%y'):
            print(True)
        else:
            print(False)
Example of valid number: 5446180993