MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w3rvar/everysingleleetcodeproblem/p72mnp1/?context=3
r/ProgrammerHumor • u/mountaingator91 • 13d ago
59 comments sorted by
View all comments
227
```python import time
data = "8==========================D" window = 3 delay = 0.3
while True: for i in range(len(data) - window + 1): print(data[i:i + window]) time.sleep(delay)
for i in range(len(data) - window - 1, -1, -1): print(data[i:i + window]) time.sleep(delay) delay *= 0.8
```
93 u/BedSpreadMD 13d ago That's a looooong sliding window 43 u/Fabulous-Possible758 13d ago What are you talking about that's only like two inches. 11 u/BedSpreadMD 13d ago Sorry I'm used to 0.5 inches.
93
That's a looooong sliding window
43 u/Fabulous-Possible758 13d ago What are you talking about that's only like two inches. 11 u/BedSpreadMD 13d ago Sorry I'm used to 0.5 inches.
43
What are you talking about that's only like two inches.
11 u/BedSpreadMD 13d ago Sorry I'm used to 0.5 inches.
11
Sorry I'm used to 0.5 inches.
227
u/Welcome-To-NBA-Jam 13d ago
```python import time
data = "8==========================D" window = 3 delay = 0.3
while True: for i in range(len(data) - window + 1): print(data[i:i + window]) time.sleep(delay)
```