You can download this code by clicking the button below.
This code is now available for download.
This function takes a list as an argument and returns a random element from the list.
Technology Stack : random
Code Type : Python Function
Code Difficulty : Intermediate
def random_select_from_list(lst):
import random
return random.choice(lst)