taking a value from double list and making it a menu
I have a list of data that reads
I can manually pick out the values i.e print dL prints name and dL emailtype.
Is it possible to isolate all the names from the list. i.e john and mark. With a program / module and then print them and produce them into something like this:
1) John 2) Mark
so that I can ask for a raw_input and then if I press 1 as selection it produces john as the answer.
so that it reads similar to the nicely written data that I can manually type as above.
You want to slice the list (to ignore the first row), then use a list comprehension to pick out just the first element of each nested list:
[row for row in nested_list[1:]]