From 2fab4515bdb50e6bc8ac8cf7b25c0a7cca5e4a77 Mon Sep 17 00:00:00 2001 From: "M. A. Reza" Date: Wed, 26 Nov 2025 15:57:48 +0330 Subject: [PATCH] update --- utils/input_utils.py | 11 +++++++++++ utils/number_utils.py | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 utils/input_utils.py create mode 100644 utils/number_utils.py diff --git a/utils/input_utils.py b/utils/input_utils.py new file mode 100644 index 0000000..8167d0d --- /dev/null +++ b/utils/input_utils.py @@ -0,0 +1,11 @@ +def get_multiple_line_input(prompt: str = "Enter/Paste your content. Ctrl-D or Ctrl-Z ( windows ) to save it."): + print(prompt) + contents = [] + while True: + try: + line = input() + except EOFError: + break + contents.append(line) + user_input = '\n'.join(contents) + return user_input diff --git a/utils/number_utils.py b/utils/number_utils.py new file mode 100644 index 0000000..c20efff --- /dev/null +++ b/utils/number_utils.py @@ -0,0 +1,3 @@ +def thousands_seperated_to_int(thousands_seperated: str) -> int: + return int(thousands_seperated.replace(',', '')) +