I have a tuple of objects that looks like this:
('MATE555', ([('Wdfd',7), ('dfs', 2), ('Tdfs77', 2), ('Fsf1', 1), ('s01', 1), ('Bdf1', 1), ('fs01', 1)],))
and i want function created which would check if the name key exist.if it exist it would return the 2nd part of the tuple, if not it would return ‘no key’.
example
get_list(‘MATE555’) would return
[(‘Wdfd’,7), (‘dfs’, 2), (‘Tdfs77’,
2), (‘Fsf1’, 1), (‘s01’, 1), (‘Bdf1’,
1), (‘fs01’, 1)]
and
get_list(“HIW6′) would return ‘no key’
Please read the Python tutorial first…this is really Python basics…