def get_random_choice(alist):
 assert (isinstance(alist, list) and (len(alist) > 0))
 index = get_random_int(len(alist))
 return alist[index]

def get_random_choice ( alist ) : assert ( isinstance ( alist , list ) and ( len ( alist ) > 0 ) ) index = get_random_int ( len ( alist ) ) return alist [ index ]
gets a random element from a list .