uebung 1 #3
5
src/exercise1.py
Normal file
5
src/exercise1.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
def remove_char(s: str) -> str:
|
||||||
|
return s[1:-1]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
6
tests/test_exercise1.py
Normal file
6
tests/test_exercise1.py
Normal file
@ -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") == ""
|
||||||
Loading…
x
Reference in New Issue
Block a user