r/learnpython • u/jonhawkeye • Sep 29 '26
best sites to learn loops and slicing?
been trying to get this down as much as I can
0
Upvotes
r/learnpython • u/jonhawkeye • Sep 29 '26
been trying to get this down as much as I can
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.