Relative Content

Tag Archive for pythonlistrandomlambda

Having an item in a list randomly select an item from another list whenever it is randomly selected from the first

I am trying to write a function that generates a random name by selecting a first name from one list and a last name from another list. I want the last item in the last name list to randomly select an item from the first name list, concatenate it with ‘son’, and then provide the resulting string. I want it to be a different result each time the item is selected- ie ‘Richardson’ one time and ‘Jacksonson’ the next.