Quantcast
Viewing all articles
Browse latest Browse all 14011

How to run an iteration when you click mouse or keyboard

In the loop below, I want to add mouse/keyboard click action that stop the loop. And when I click again, the loop resume.Can you please help?

import timefor i in range(10):    print(i)    time.sleep(2)

Viewing all articles
Browse latest Browse all 14011

Trending Articles