storing in list and retrieving.
ssmile03 at gmail.com
Thu Feb 23 09:45:00 CET 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
> > 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list