How can I add an element to the list in python when I create it using random.choice and a reason?
For example, I do this:
numbers = [1, 2, 3, 4] other_numbers = [] print(other_numbers.append(ramdom.choice(numbers))) It returns None .
So how can I make it so that I pin this element and add it to the list
appendmethod. Put thechoiceresult into the variable, accept the variable and add it to the list - gil9red