Sound alarm when code finishes

前端 未结 11 806
离开以前
离开以前 2021-01-29 17:42

I am in a situation where my code takes extremely long to run and I don\'t want to be staring at it all the time but want to know when it is done.

How can I make the (Py

11条回答
  •  离开以前
    2021-01-29 18:18

    It can be done by code as follows:

    import time
    time.sleep(10)   #Set the time
    for x in range(60):  
        time.sleep(1)
        print('\a')
    

提交回复
热议问题