X-Received: by 10.66.254.104 with SMTP id ah8mr38424604pad.16.1451095456496; Fri, 25 Dec 2015 18:04:16 -0800 (PST) X-Received: by 10.50.8.105 with SMTP id q9mr163103iga.9.1451095456466; Fri, 25 Dec 2015 18:04:16 -0800 (PST) Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!mv3no15344854igc.0!news-out.google.com!f6ni33846igq.0!nntp.google.com!mv3no21218416igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Fri, 25 Dec 2015 18:04:15 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=105.112.43.215; posting-account=FsP2WAoAAAD-p5KU6kBIb1sTNEUBXgmb NNTP-Posting-Host: 105.112.43.215 References: <9b74e1e6-a28e-475d-b213-3a80e241773d@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Need help on a project To :"Create a class called BankAccount with the following parameters " From: princeudo52@gmail.com Injection-Date: Sat, 26 Dec 2015 02:04:16 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.python:100874 #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.