diff options
author | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2016-10-10 22:03:50 +0700 |
---|---|---|
committer | Raphael McSinyx <vn.mcsinyx@gmail.com> | 2016-10-11 09:16:52 +0700 |
commit | c1628d6538d846f26d6dfd88e495205235c31110 (patch) | |
tree | 3fcc67809b8c8fe15ff5c7240f90bda8db6ef385 /daily/285easy/1enc.py | |
parent | 73b09b6b69abce68a06815e7cd789ff0ae70e2b2 (diff) | |
download | cp-c1628d6538d846f26d6dfd88e495205235c31110.tar.gz |
/r/dailyprogrammer Challenge #285: Add Python 3 solutions
Diffstat (limited to 'daily/285easy/1enc.py')
-rwxr-xr-x | daily/285easy/1enc.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/daily/285easy/1enc.py b/daily/285easy/1enc.py new file mode 100755 index 0000000..8ce1a95 --- /dev/null +++ b/daily/285easy/1enc.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 + +from binascii import b2a_uu + +with open('1enc.inp') as f: + s = f.read() + +with open('1enc.out', 'w') as f: + for i in range(0, n, 45): + f.write(b2a_uu(bytes(s[i : i+45], 'utf-8')).decode()) |