Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions koans/about_slices.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def test_slice_with_index():
"""
str1 = "Python anywhere"

assert str1[2] == ___
assert str1[2] == 't'


def test_slice_with_index_minus_one():
Expand All @@ -18,7 +18,7 @@ def test_slice_with_index_minus_one():

str1 = "Python anywhere"

assert str1[-1] == ___
assert str1[-1] == 'e'


def test_slice_with_negative_index():
Expand All @@ -29,7 +29,7 @@ def test_slice_with_negative_index():

str1 = "Python anywhere"

assert str1[-4] == ___
assert str1[-4] == 'h'


def test_slice_with_substring():
Expand All @@ -43,7 +43,7 @@ def test_slice_with_substring():

str1 = "Python anywhere"

assert str1[2:9] == ___
assert str1[2:9] == 'thon an'


def test_slice_with_diff_indexes():
Expand All @@ -53,7 +53,7 @@ def test_slice_with_diff_indexes():

str1 = "Python anywhere"

assert str1[1:-1] == ____
assert str1[1:-1] == "ython anywher"


def test_slice_end_of_string():
Expand All @@ -63,7 +63,7 @@ def test_slice_end_of_string():

str1 = "Python anywhere"

assert str1[3:] == ___
assert str1[3:] == "hon anywhere"


def test_slice_beginning_of_string():
Expand All @@ -74,7 +74,7 @@ def test_slice_beginning_of_string():

str1 = "Python anywhere"

assert str1[:5] == ___
assert str1[:5] == "Pytho"


def test_slice_with_equal_substring():
Expand All @@ -84,7 +84,7 @@ def test_slice_with_equal_substring():

str1 = "Python anywhere"

assert str1[:] == ___
assert str1[:] == "Python anywhere"


def test_slice_with_step():
Expand All @@ -97,7 +97,7 @@ def test_slice_with_step():

str1 = "Python anywhere"

assert str1[1:9:2] == ___
assert str1[1:9:2] == "yhna"


def test_slice_string_backwards():
Expand All @@ -107,4 +107,4 @@ def test_slice_string_backwards():

str1 = "Python anywhere"

assert str1[::-1] == ___
assert str1[::-1] == "erehwyna nohtyP"