I would like to know how to perform 1000 simulations of the following code and collect all the output data in a CSV file containing two columns (l1, l2) and eight rows (ABCDEFGH) with the respective frequency of appearance of the letters a length of the 1000 simulations.
import random
l1= random.choice("ABCDEFGH")
l2= random.choice("ABCDEFGH")
The eight rows should represent the times that l1
and l2
have turned out to be each letter throughout the 1000 simulations. That is, a table that collects the sequence of occurrence of each letter in l1 and l2, throughout the 1000 simulations. For that we need to collect the data in two columns (l1, l2) and eight rows (ABCDEFGH).