You can download this code by clicking the button below.
This code is now available for download.
This function randomly selects an element from a given list.
Technology Stack : unittest, random
Code Type : Custom function
Code Difficulty : Intermediate
import unittest
import random
def random_choice_element_from_list(list):
return random.choice(list)