the slice syntax doesn't support "slice to x or len()", so we have to use this idiom. i wonder what one does when wanting to do that and work with a result, but the answer is either something obvious/idiomatic or writing a function that does it.
|
||
| 37 | 37 |
|
| 38 | 38 |
|
| 39 | 39 |
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 44 | 45 |
|
| 45 | 46 |
|
| 46 | 47 |
|