From f13e8da7ea43a81d3422fab848a31ca079f62d4b Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Tue, 26 Nov 2019 17:52:22 +0100 Subject: [PATCH] Add get_lines --- cheatsheet.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cheatsheet.py b/cheatsheet.py index 9ef116c..3382216 100644 --- a/cheatsheet.py +++ b/cheatsheet.py @@ -12,3 +12,11 @@ def get_line_as_int(): def get_line_as_ints(): variable = map(int, input().split(" ")) + + +def get_lines(): + import sys + + lines = [] + for line in sys.stdin: + lines.append(line.rstrip("\n"))