I want to iterate through a list of items and log a score for each item. I do not know how to define a function to wait until a key is pressed. I have tried mscvrt and cv. I do not want to use input(), because I want it to work whatever the screen is on. I just want it to know if that key is pressed and then continue. I use python 3.
def wait_for_key():
#wait until a key is pressed, return that key
def score_list():
a = [jack, lauren, taylor]
b = []
for item in a:
score = wait_for_key()
itemscore = item + ", " + score
b.append(itemscore)