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