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 provided list and returns it.
Technology Stack : random
Code Type : Function
Code Difficulty : Beginner
def random_choice(items):
import random
return random.choice(items)