Key_resp.corr not storing properly

What I’m getting at here is…how can the correct answer for a single key response be a whole list? I am assuming that you must be looping through the list to display the numbers one at a time.

BTW, I have a digit span demo in online demos which generates the number sequences on the fly.

Digit Span code | try it

Random digits are presented at a rate of one per second. The first digit cannot be 0 Following digits can be 0 but cannot be the same as the previous digit. If the answer is correct the span is increased for the next trial If the answer is wrong the span is decreased for the next trial. If there are at least two errors at a given span and that represents more than half of the total attempts at that span then the experiment ends, returning a span of one less than the final span attempted.