import random


def getRandomItemFromList(list1):
    """ Given a list, returns random element """
    if len(list1) == 0:
        return None
    indexNum = random.randint(0, len(list1) - 1)
    return list1[indexNum]