Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit afefe47

Browse files
authored
Merge pull request #17 from SimonOsipov/master
Fixed typo in variable
2 parents b1ae9e8 + cc76410 commit afefe47

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

koans/about_slices.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def test_slice_with_index():
88
"""
99
str1 = "Python anywhere"
1010

11-
assert srt[2] == ___
11+
assert str1[2] == ___
1212

1313

1414
def test_slice_with_index_minus_one():
@@ -18,7 +18,7 @@ def test_slice_with_index_minus_one():
1818

1919
str1 = "Python anywhere"
2020

21-
assert srt[-1] == ___
21+
assert str1[-1] == ___
2222

2323

2424
def test_slice_with_negative_index():
@@ -29,7 +29,7 @@ def test_slice_with_negative_index():
2929

3030
str1 = "Python anywhere"
3131

32-
assert srt[-4] == ___
32+
assert str1[-4] == ___
3333

3434

3535
def test_slice_with_substring():
@@ -43,7 +43,7 @@ def test_slice_with_substring():
4343

4444
str1 = "Python anywhere"
4545

46-
assert srt[2:9] == ___
46+
assert str1[2:9] == ___
4747

4848

4949
def test_slice_with_diff_indexes():
@@ -63,7 +63,7 @@ def test_slice_end_of_string():
6363

6464
str1 = "Python anywhere"
6565

66-
assert srt[3:] == ___
66+
assert str1[3:] == ___
6767

6868

6969
def test_slice_beginning_of_string():
@@ -74,7 +74,7 @@ def test_slice_beginning_of_string():
7474

7575
str1 = "Python anywhere"
7676

77-
assert srt[:5] == ___
77+
assert str1[:5] == ___
7878

7979

8080
def test_slice_with_equal_substring():
@@ -84,8 +84,7 @@ def test_slice_with_equal_substring():
8484

8585
str1 = "Python anywhere"
8686

87-
assert srt[:] == ___
88-
87+
assert str1[:] == ___
8988

9089

9190
def test_slice_with_step():
@@ -98,13 +97,14 @@ def test_slice_with_step():
9897

9998
str1 = "Python anywhere"
10099

101-
assert srt[1:9:2] == ___
100+
assert str1[1:9:2] == ___
101+
102102

103103
def test_slice_string_backwards():
104104
"""
105105
Если задать шаг -1, то символы будут идти в обратном порядке
106106
"""
107107

108-
srt1 = "Python anywhere"
108+
str1 = "Python anywhere"
109109

110-
assert srt[::-1] == ___
110+
assert str1[::-1] == ___

0 commit comments

Comments
 (0)