Question:
I am trying to write a function that, given a dictionary of restaurants, allows you to randomly pick a restaurant based on your choice of one of the values. For example, if you say you want a bakery then it will only give you bakeries.I have only worked on the code for choosing the type of restaurant so far, and I am struggling with how to generate a random list. So I am checking for a value and, if it has it, would want to add the key to a list. Does anyone have any suggestions on how to do this?
Answer:
To return completely random restaurant suggestions you need to create a list of all the types first and then you can choose one and return the names of the restaurants.If you have better answer, please add a comment about this, thank you!