I'm creating a memory game in Python, where a grid of words is displayed for 20 seconds before being replaced by another grid, in which one of the words has been changed. Currently, this grid is printed and then another grid is printed below.
grid = [nineWordsRandom [j:j+3] for j in range(0, len(nineWordsRandom), 3)]
for x,y,z in grid:
print(x,y,z)
How could I remove this grid after 20 seconds and replace it with another grid? Thanks.