diff --git a/part_I/string_manipulation/challenges/chap6_challenge10.py b/part_I/string_manipulation/challenges/chap6_challenge10.py index 287dc1c..4b2e186 100644 --- a/part_I/string_manipulation/challenges/chap6_challenge10.py +++ b/part_I/string_manipulation/challenges/chap6_challenge10.py @@ -1,3 +1,9 @@ +# static solution sentence = "It was a bright cold day in April, and the clocks were striking thirteen." slce = sentence[0:33] print(slce) + +#dynamic solution +sentence = "It was a bright cold day in April, and the clocks were striking thirteen." +slce = sentence[:sentence.index(",")] +print(slce)