diff options
| author | Andrew <saintruler@gmail.com> | 2019-03-04 19:58:27 +0400 |
|---|---|---|
| committer | Andrew <saintruler@gmail.com> | 2019-03-04 19:58:27 +0400 |
| commit | be035287d99554c1eaaea0cc56d8404d7d97b723 (patch) | |
| tree | 37887abea21958c684573b693798dea9c2b2280d /day1 | |
| parent | cf734a68aeba34576d9bf5430aeaa75224010c67 (diff) | |
Day 1 Task 1
Diffstat (limited to 'day1')
| -rw-r--r-- | day1/task1/task1.py | 6 | ||||
| -rw-r--r-- | day1/task1/task1_data.txt | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/day1/task1/task1.py b/day1/task1/task1.py new file mode 100644 index 0000000..6396d92 --- /dev/null +++ b/day1/task1/task1.py @@ -0,0 +1,6 @@ +character = input() +if len(character) > 1: + print('Введите РОВНО один символ') +else: + with open('task1_data.txt') as f: + print(f.read().count(character)) diff --git a/day1/task1/task1_data.txt b/day1/task1/task1_data.txt new file mode 100644 index 0000000..09dcdd3 --- /dev/null +++ b/day1/task1/task1_data.txt @@ -0,0 +1 @@ +jskdabfkjhaFVADSKNCA coiojAFHAIDjjakhbv;oAKJVBHLSA.C ASBJ BAJ VBASDJ |