def save_file(filename, data): with open(filename, 'w') as file: file.write('\n'.join(lmap(str, data)))
def load_file(filename): with open(filename, 'r') as file: contents = file.read().splitlines() return lmap(int, contents)
def plaintext_to_str(plaintext): return ''.join(lmap(chr, plaintext))
def get_plaintext(): plaintext = input('Please type your message: ') return lmap(ord, plaintext)
def load_sheet(filename): with open(filename, 'r') as sheet: contents = sheet.read().splitlines() return lmap(int, contents)