Compare commits

..

2 Commits

Author SHA1 Message Date
868c4bdadc Merge pull request 'exercise1a' (#2) from exercise1a into master
Reviewed-on: #2
Tiptop
2026-02-27 14:29:35 +01:00
a191b61164 exercise1a 2026-02-27 14:24:06 +01:00
3 changed files with 12 additions and 0 deletions

View File

@ -5,3 +5,4 @@
Aufgabe aus Codewars: https://www.codewars.com/kata/56bc28ad5bdaeb48760009b0
**Aufgabe:** Funktion zum Abschneiden des ersten und letzten Buchstabens eines übergebenen Strings

5
src/exercise1a.py Normal file
View File

@ -0,0 +1,5 @@
def remove_char(s):
return s[1:-1]
if __name__ == "__main__":
print(remove_char("hallo"))

6
tests/test_exercise1a.py Normal file
View File

@ -0,0 +1,6 @@
from src.exercise1a import remove_char
def test_remove_first_last_char() -> None:
assert remove_char("eloquent") == "loquen"
assert remove_char("ab") == ""