On Saturday, December 26, 2015 at 3:04:45 AM UTC+1, princ...@gmail.com wrote: > #i have worked over 2hours only to get this: some-one help please > manipulate_data = [] > item = {"apples": 23, "oranges": 15, "mangoes": 3, "grapes": 45} > manipulate_data.append(item) > for i in reversed(manipulate_data): > new = {"ANDELA", "TIA", "AFRICA"} > def list_append(manipulate_data, new): > manipulate_data.append(new) > return new > return dict.keys() > > > print manipulate_data > #this is the instruction: > Create a function manipulate_data that does the following > Accepts as the first parameter a string specifying the data structure to be > used "list", "set" or "dictionary" > Accepts as the second parameter the data to be manipulated based on the data > structure specified e.g [1, 4, 9, 16, 25] for a list data structure > Based off the first parameter > > return the reverse of a list or > add items `"ANDELA"`, `"TIA"` and `"AFRICA"` to the set and return the > resulting set > return the keys of a dictionary.
I am now more confused than before, as beginners like we have stated earlier, how does this solution applies to the real question ( bank account ) -- https://mail.python.org/mailman/listinfo/python-list