import random


names_list = ['beyonce', 'beven', 'brian', 'chido']


def get_list(names_list):
    reversed_list = [name[::-1] for name in names_list]
    return reversed_list


def generate_random_num(names_list):
    '''Generate a random number with the upper bound as the length of a list.'''
    
    random_num = int(random.randrange(1,len(names_list)))
    return random_num


def generate_random_name():
    '''Generate a random name from a given list.'''
    
    names = get_list(names_list)
    num = generate_random_num(names_list)
    print(names[num])



def compare(l1, l2): ## for future
    if l1 == l2:
        return 'correct'
    else :
        return 'wrong'




if __name__ == "__main__":
    generate_random_name()
    

