Commit 339a0d2
authored
fix_rotate.py (keon#778)
* fix_rotate.py
The way it was, you couldn't pass in a rotation higher than the length of the string doubled without getting a blank string in return. This way allows you to pass in any positive integer and get a result.
Also,
The last line of the description said that it took 2 strings and returned a boolean. This is not correct. The first line of the comment is correct.
* Update rotate.py
After submitting my last change, I realized it would have been better to not keep concatenating the string.
* Updated Comments rotate.py1 parent 5995c05 commit 339a0d2
1 file changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| 11 | + | |
9 | 12 | | |
10 | | - | |
11 | | - | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
0 commit comments