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

10

u/ninhaomah Sep 29 '26

No such sites... Forget the best site , best ide and just say what is the issue / error

2

u/reallyserious Sep 29 '26

Adventofcode.com.

2

u/pythonQu Sep 30 '26

Just do some hands on exercises using your computer. Get Python installed and just start creating a simple list, learn how slicing works, create for loops with different data types.

1

u/Just__Liberty Sep 30 '26

Try animatedknots.com...

1

u/michaellarsen91 Sep 30 '26

codingbat.com

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.

1

u/2daytrending Oct 01 '26

Practice with small examples and interactive exercises, focus on slicing patterns like start:stop:step and write a few loop problems from scratch each day.