about summary refs log tree commit diff
path: root/THT/C/Q-2016/bai3.py
diff options
context:
space:
mode:
authorNguyễn Gia Phong <vn.mcsinyx@gmail.com>2019-12-15 15:09:13 +0700
committerNguyễn Gia Phong <vn.mcsinyx@gmail.com>2019-12-15 15:09:13 +0700
commit9e28e4c7b67c54229df11d355047ac8a88ea1817 (patch)
tree0d9d40db69613c2c49564a3f1987a005d61f4db3 /THT/C/Q-2016/bai3.py
parent67393f42f41ab92219deb549f711121c4dab845b (diff)
downloadcp-9e28e4c7b67c54229df11d355047ac8a88ea1817.tar.gz
Normalize pathname
Diffstat (limited to 'THT/C/Q-2016/bai3.py')
-rw-r--r--THT/C/Q-2016/bai3.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/THT/C/Q-2016/bai3.py b/THT/C/Q-2016/bai3.py
deleted file mode 100644
index f4139a9..0000000
--- a/THT/C/Q-2016/bai3.py
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python3
-d = dict()
-with open('bai3.inp') as f:
-    for i in f.readlines():
-        for j in '.,;!?':
-            i = i.replace(j, ' ')
-        for j in i.split():
-            d[j] = d.get(j, 0) + 1
-l = [(value, key) for (key, value) in d.items()]
-l.sort(reverse=True)
-with open('bai3.out', 'w') as f:
-    f.write(str(len(l)) + '\n')
-    for i, j in l:
-        f.write('{} {}\n'.format(i, j))