You can download this code by clicking the button below.
This code is now available for download.
This function randomly selects an element from the input list and returns it. It uses the built-in random module in Python.
Technology Stack : Python, random
Code Type : Python Function
Code Difficulty : Intermediate
def random_select_from_list(input_list):
import random
return random.choice(input_list)
# JSON Explanation