human
I am working on the file "2016/python3/Day17.ipynb".
The first task is:
Checking for open doors
We take the first four characters of the checksum, compare them against the given condition of being less than 10 or 'a' which signlas a closed door. Return only directions that are valid - open doors.
'a' or less --&gt.
closed
others      --&gt.
open
Can you write Python program for it?

Write me a Python program to compare them against the given condition of being less than 10 or 'a' which signlas a closed door?
assistant
#Here is Python program to compare them against the given condition of being less than 10 or 'a' which signlas a closed door.

def open_doors(checksum):
    def is_open(character):
        if character > 'a':
            return True
        return False
    
    return [
        directions[index] 
        for index, character in enumerate(checksum[:4]) 
        if is_open(character)]