r/PythonLearning • u/Repulsive-Song-1594 • 5d ago
i am stuck with the range function
sorry but i am gonna crash out because of the range function i cant understand it well to use it this is driving me crazy any one could give me a video explaining everything i dont mind it being an hour long
9
Upvotes
View all comments
Show parent comment
1
u/Dry-Aioli-6138 1d ago
Well, that's one way to do it. Not very pythonic imho. I would just make pairs of number from the list and a copy of that list, but with numbers shifted by one (throwing out the first one)
You can do it in a one liner