I get keypress and timing output as tuples in a list of lists.
output = [[], [], [('m', 2.8167322647641413)], [], [('m', 2.8179350001591956)], [], [], [], [], [], [], [('m', 0.3381059524253942)], []]
I manage to select all the non-empty lists using:
for i in x:
if i != []:
print i
How do I also get the corresponding position in the output list? I tried:
for idx, val in enumerate(x):
print(idx, val)
but that gives me all the indices and all lists.