python-beginner Definition and 1 Threads
-
I
Why does my loop run slower with larger lists in Python?
Hi everyone, I’m practicing Python and noticed something strange. When I run a simple loop on a small list, it’s fast—but when I run the same loop on a much larger list, the execution time increases more than I expected. Example (simplified version): data =list(range(1_000_000)) count = 0...- Isabella Hope
- Thread
- Python python-beginner python-performance
- Replies: 11
- Forum: Programming and Computer Science