def read_data(filename):
    """
    Reads data file into a list of ints.
    """
    
    int_data = []
    
    f = open(filename, 'r')
    for line in f:
        data = line.strip('\n')
        int_data += [int(char) for char in data]
    
    f.close() 
         
    return int_data