[Solved] Adding and deleting random entries from a list inside another list in Python?

[ad_1]

You can use random.choice() and do something like this:

import random
for i in range(4): # add 4 entries from l2 and l3
    l.append(random.choice(l2))
    l.append(random.choice(l3))

Hope this helps.

0

[ad_2]

solved Adding and deleting random entries from a list inside another list in Python?