I am trying to make a playfair cipher but I am having trouble getting my variables into the right spot.
I have a function that encodes 2 plaintext letters at a time and return the encoded equivalent but it only accepts 2 args of the single letter(in string). I need help getting seperating my list then encoding the pair.
This is what I have
def function(plaintext):
    temp_hold = ''
    encode_out = ''
    sendout = ''
    #breaks into pairs of 2 (list within a list)
    temp_hold = [plaintext[i:i+2] for i in range(0, len(plaintext), 2)]
    for i in range(len(temp_hold)):
        for j in range(len(temp_hold)):
            encode_out = encode_pair(temp_hold[i][j], temp_hold[i][j])
    print encode_out
    # encode pair takes (a,b) and returns its encoded value
print function("abcd") # should print HSCI
 
     
    