int_to_char = dict((i, c)fori, cinenumerate(alphabet))# integer encode input datainteger_encoded = [char_to_int[char]forcharindata]print(integer_encoded)# one hot encodeonehot_encoded = list()forvalueininteger_encoded: letter = [0for_inrange(len(alphabet))] letter[value] = 1 onehot...