From b911cc2568b761ea0e27094279907c2902fc7cfd Mon Sep 17 00:00:00 2001 From: Daniel Tschertkow Date: Sun, 22 Nov 2020 16:30:38 +0100 Subject: [PATCH] =?UTF-8?q?=C3=A4ndert=20Kommentare=20von=20libex01=20zu?= =?UTF-8?q?=20Docstring?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libex01.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/libex01.py b/src/libex01.py index 97ac0d3..91a5d53 100644 --- a/src/libex01.py +++ b/src/libex01.py @@ -1,10 +1,14 @@ -# file: read_plaintext.py -# module to read plaintext from a file into a string variable. -# Skips non-alphabetic characters and converts the rest to lower case +""" +module to encapsulate common functions for exercise01. +""" import string def read_plaintext(file_path): + """ + funciton to read plaintext from a file into a string variable. + Skips non-alphabetic characters (including whitespace) and converts the rest to lower case. + """ txt = "" with open(file_path, "r") as _file: for line in _file: