def gen7CipherList(birthYear):
    """Takes an integer birthyear and returns a sorted list of possible 7th 
    CPR digit
    
    Input:
        birthYear, int, an integer indicating year of birth
    Output:
        poss7Cipher, list of str[1], ordered list of possible 7th cipher. 
            Empty list if birthYear is out of range.
    """
    
    
    #Note: While one can speculate how CPR numbers will be extended to years
    #beyond 2057, it is currently not defined. I therefor opted for this simple
    #implementation.
    
    if birthYear >= 1858 and birthYear < 1900:
        return ['5','6','7','8']
    elif birthYear >= 1900 and birthYear < 1937:
        return ['0','1','2','3']
    elif birthYear >= 1937 and birthYear < 2000:
        return ['0','1','2','3','4','9']
    elif birthYear >= 2000 and birthYear < 2037:
        return ['4','5','6','7','8','9']
    elif birthYear >= 2037 and birthYear < 2057:
        return ['5','6','7','8']
    else:
        print("Warning. The birthyear", str(birthYear), "is outisde the covered range from 1858 to 2057. Returning empty list.")
        return []