Hi Ahmed,
Thanks for your question! You're right, in the script from lesson 1, Jaime flattens the output from the "List-item"- component, and in the beginning of lesson 2, he uses the "Shift path" component.
The reason either one needs to be done is to create a flattened list for Y-input from the "Point"-component (because the X input is also a flattened list). It is a bit strange Jaime uses the "Shift path"-component to create a flattened list this way, but that's all its purpose. Flattening the output of the "List-item"- component works just as well and gives you exactly the same result.
For more info on grafted lists and data trees, check out the Grasshopper 101 and 102: https://thinkparametric.com/courses/grasshopper-101-introduction-to-parametric-modelling
https://thinkparametric.com/courses/grasshopper-102-data-lists-and-tree-structures
Thanks and good luck!
Arie