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