How to design operation span task

I am designing a complex operation span task to measure working memory capacity.

Because I do not know any knowledge of python, I downloaded a sample from github.

In the first step, I would like to ask participants to remember a serial of letters. I hope that the number of letters are either 3, 4, 5, 6, or, 7 in a trial. There are 4 trials. In each trial, the number of letters are randomly assigned. For example, a participant first is presented 5 letters, second they is presented 3 letters, third they is presented 7 letters, at last they is presented 4 letters.

Anyone can help me! I cannot a video that shows me how to do.
Any help would be grateful.