Let's say I have the following list in python:
probs = [0.1, 0.4, 0.9]
the number of experiments is 20 (N_episodes) and after x experiments, e.g. 10, I want to add an element to the list.
I already came up with a for loop:
for i in range(N_episodes): new_bandit = np.random.random() new_bandit_probs = probs.append(new_bandit)
but this gives me endless new elements, I just want one new element. Can someone help me out?