def str_to_bits(stri):
    """Convert a string to a list of its bits"""
    result = []
    for char in stri:
        bits = bin(ord(char))[2:]
        bits = '00000000'[len(bits):] + bits
        reso = []
        for bit in bits:
            reso.append(int(bit))
        result.append(reso)
    return result