swcarpentry / python-novice-inflammation

Programming with Python
http://swcarpentry.github.io/python-novice-inflammation/
Other
303 stars 781 forks source link

Lesson 04: Solutions omitting slice indices before explanation #1071

Open kpidge opened 1 year ago

kpidge commented 1 year ago

How could the content be improved?

There are a couple of exercises towards the end of lesson 04 (lists) that have solutions omitting list indices, but there is no prior discussion of this possibility, or how to do it. This is particularly relevant for the exercise "Slicing from the end" (linked below), where the solution requires omission of a slice index. This exercise could be moved so that it is located after the subsequent discussion of this concept, and similar for the "Non-continuous slices" exercise (though for this one, the brief explanation of how the indices can be left out could just be removed).

Edit: I remembered that there is an explanation of slicing and leaving out indices here, preceding the mentioned exercises. I still think the ordering could be revised, though that depends on how difficult the exercises in lesson 04 are intended to be.

Which part of the content does your suggestion apply to?

https://swcarpentry.github.io/python-novice-inflammation/04-lists.html#slicing-from-the-end