r/learnpython • • Sep 29 '26

best sites to learn loops and slicing?

been trying to get this down as much as I can

0 Upvotes

12 comments sorted by

View all comments

1

u/PureWasian Sep 30 '26

Create a list with a bunch of numbers in it. Loop to print out all subsets of 3 sequential numbers within the list (including duplicates).

Essentially, make a sliding window. If you can understand the problem here there's really not much else to it other than using it in practice as you need it for your projects.