I added a plus sign to show Python to add "\n" or a new line to end of the file. ----- Original Message ----- From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" <tutor@python.org> Sent: Wednesday, August 03, 2005 8:53 PM Subject: Re: [Tutor] What's the invalid syntax? Code supplied
> > > On Wed, 3 Aug 2005, Nathan Pinno wrote: > >> I forgot to add that it works because commas separate it into groups so >> that >> when the reads the file it has output, the program can split it into the >> site, ID, and passcard. > > > Hi Nathan, > > Ok, it's good that we're looking back, because that's not right; commas > did not have to do with what was causing problems. Let's look at the > buggy statement again. > > out_file.write(site+","+sitelist[site][0]+","+sitelist[site][1]"\n") > > With fresh eyse, can you look back at how you corrected this? > > > If you think this my insisting on you seeing why things weren't working, > consider this: if it's an easy error to make (and it is an easy mistake to > make), you may want to spend some time to learn how to recognize the error > and its correction. That way, you don't have to wait for folks on Tutor > to point things out for you. > > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor