[Tutor] Newbie - Outputting List to a File

Matt Hehman druidmatt at yahoo.com
Mon Oct 13 02:05:46 EDT 2003


I have written a program that will either give you
prime factors of an inputted number or inform you that
it is prime.  (That is pretty much my programming
resume.)  To do this, I begin by generating a list of
prime numbers, and then I use them for mod operations.
 I was wondering if there was a way to save the list
of primes generated to an output file so that I could
just retrieve it and use it for the next number I
tested.  I tried the .write command and received the
error message:

TypeError: argument 1 must be string or read-only
character buffer, not list

Also, I started playing around with increasingly large
numbers, is there anything I need to do to accomodate
that?



__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com



More information about the Tutor mailing list