python time测试
python time测试
import time def timer(seconds): start_time = time.time() while True: elapsed_time = time.time() - start_time if elapsed_time >= seconds: break print("Time's up!")
timer(10) # runs for 10 seconds
#####################
QQ 3087438119