regarding problem set 4- (abstract - the problem is to be able to create a dictionary that can return a decoded character for each encoded character of a string, and vice versa, e.g. by encoding each letter by shifting its place in the alphabet and creating a corresponding dictionary) i'll post my encoder. it's not elegant, but it's working (albeit not perfectly). the problem i'm dealing with is that when my program returns an encoded string, there is a empty space (" ") placed in-between each character.
what's odd is that there are no spaces in the encoder/decoder dictionaries, so i'm assuming it has to be in the print section of the "apply_coder" function.
figured it out. for those interested, the solution was to append each decoded character to an empty list, then join them and print the result. printing characters one by one as they were decoded resulted in blank characters, at least in my compiler.
Join our real-time social learning platform and learn together with your friends!