I am very new to Python and have run into a road block. Is it possible to use list comprehension to perform a shift on each letter of a word in a list? Also how could I utilize ord() and chr() in a similar list comprehension manner?
So far I have the following code:
def shift( file1="file1.txt", file2 ="file2.txt"):
key = int(input("Enter shift key: "))
with open(" file1. txt") as readfile:
lines = readfile.readlines()
lines = [words.lower() for words in lines]
lines = [ words.split(" ") for words in lines]
All I need now is to perform the actual shift but I am stumped :/