From c11e051a4d5a14e3699920c1669b0696720e4130 Mon Sep 17 00:00:00 2001 From: Marco Schmid Date: Fri, 27 Feb 2026 14:40:59 +0100 Subject: [PATCH] uebung 1 --- src/exercise1.py | 5 +++++ tests/test_exercise1.py | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 src/exercise1.py create mode 100644 tests/test_exercise1.py diff --git a/src/exercise1.py b/src/exercise1.py new file mode 100644 index 0000000..a1824df --- /dev/null +++ b/src/exercise1.py @@ -0,0 +1,5 @@ +def remove_char(s: str) -> str: + return s[1:-1] + + + diff --git a/tests/test_exercise1.py b/tests/test_exercise1.py new file mode 100644 index 0000000..20e8a97 --- /dev/null +++ b/tests/test_exercise1.py @@ -0,0 +1,6 @@ +from src.exercise1 import remove_char + + +def test_remove_first_last_char() -> None: + assert remove_char("eloquent") == "loquen" + assert remove_char("ab") == "" -- 2.30.2