storing in list and retrieving.

Smiley 4321 ssmile03 at gmail.com
Thu Feb 23 03:45:00 EST 2012


It requires concepts of 'python persistence' for the code to be designed .

Else it simple.

Looking for some flow??
----

On Thu, Feb 23, 2012 at 12:01 PM, Chris Angelico <rosuav at gmail.com> wrote:

> On Thu, Feb 23, 2012 at 5:24 PM, Smiley 4321 <ssmile03 at gmail.com> wrote:
> > I need to write two file using python script as below -
> >
> > 1. Store.py: Write a script to store a list say "store_list = ["Apple",
> > "Orange", "PineApple". “and so on” ]" to disk.
> >
> > 2. Retrieve.py: Read the object stored in the ‘Store.py’ file and print
> the
> > contents of this list.
> >
> > I have to run on Linux with python-2.6.5.
>
> This looks like homework, so I'm just going to give a broad hint.
>
> Figure out a file format (one per line, or pickled, or whatever), then
> write one program that writes that format and another that reads it.
> The open() built-in function will open files for reading or writing,
> so that's a good place to start.
>
> Get as far as you can on your own, and if you get stuck, ask the list
> for more specific help. Good luck!
>
> Chris Angelico
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120223/dbb3d961/attachment-0001.html>


More information about the Python-list mailing list