From 4541c376eed02cfc7a0758eb4b675939311ec1d0 Mon Sep 17 00:00:00 2001 From: Samuel Date: Tue, 15 May 2018 16:44:44 +0800 Subject: [PATCH] Updated permuteText to not take away last line char --- permutateText/permutateText.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/permutateText/permutateText.py b/permutateText/permutateText.py index 79d3827..8bc27c3 100755 --- a/permutateText/permutateText.py +++ b/permutateText/permutateText.py @@ -33,7 +33,10 @@ else: currRead=fileHandles[operator].readline() if currRead != "": - currState[operator]=currRead[:-1] + if currRead[-1:]=="\n": + currState[operator]=currRead[:-1] + else: + currState[operator]=currRead if operator==len(filenames)-1: print(showState(currState))