[Solved] How to iterate over a dictionary and a list simultaneously? [closed]
You can use: maketrans–which allows creation of a translation table translate–applies translation table from maketrans to a string Code def encrypt(infile, outfile, translation): ”’ Encrypts by applying translation map to characters in file infile. ”’ # Create translation table table=””.maketrans(translation) # Apply table to all characters in input file # and write to new output … Read more