You can download this code by clicking the button below.
This code is now available for download.
Selects and returns a random element from the given list.
Technology Stack : random
Code Type : Function
Code Difficulty : Intermediate
def get_random_element_from_list(lst):
import random
return random.choice(lst)