Aug-06-2018, 11:41 AM
hi,
i am trying to insert random colors from a list into another list, but facing a bit problem, as it is returning lambda store place where it is stored not the colors.
How can i print the colors
i am trying to insert random colors from a list into another list, but facing a bit problem, as it is returning lambda store place where it is stored not the colors.
How can i print the colors
import random colors = ["red", "black", "green"] dc = [(lambda a: random.choice(a)) for a in colors] print(dc)