import keyboard
import random
import time
key = keyboard.is_pressed
lets = "abcdefghijklmnopqrstuvwxyz,."
start = time.time()
for i in range(50):
q = lets[random.randrange(len(lets))]
print(q)
while True:
if key(q):
break
t = time.time()-start
print("タイム:{}\'{}\"{}".format(t//3600, t%3600//60, t%3600%60//1).replace(".0", ""))
To embed this project on your website, copy the following code and paste it into your website's HTML: