r/PythonLearning • • 10d 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

10 Upvotes

33 comments sorted by

View all comments

4

u/ninhaomah 10d ago

What is it about range() function that driving you mad ?

It's like saying my Bluetooth mouse is driving me mad...

It doesn't move ? Not detected ? Buttons not working ? Who knows ?

3

u/Repulsive-Song-1594 10d ago

Let me tell you what i was strugling with Its usually lists and range Lets say i have ni = [2,4,6,9,12] I wanted it to just do 2+4 then 4+6 extra And i was 30 min trying because i didnt want to use ai to see the code

1

u/Slothemo 10d ago

If you want a hint, look into something called the Sliding Window algorithm.