Re: [Tutor] string list in alphabetical!

2013-10-21 Thread Steven D'Aprano
On Mon, Oct 21, 2013 at 01:21:59PM +0200, Lukas Nemec wrote: > On 10/21/2013 01:16 PM, Steven D'Aprano wrote: > >That is the normal process of programming: > > > >1) write some code > >2) fix the bugs until it will run > >3) test if it works correctly > >4) repeat until done > > > > > I'd like to

Re: [Tutor] Tutor] string list in alphabetical!

2013-10-21 Thread Alan Gauld
On 21/10/13 17:16, Siva Cn wrote: Hi Sammy, Try this this may help you ! Siva, the list policy is not to provide full solutions for homework type questions. It's better to provide some hints and let the OP figure it out for him/her self. That having been said there are a few issues with the

Re: [Tutor] string list in alphabetical!

2013-10-21 Thread Albert-Jan Roskam
On Mon, 10/21/13, Lukas Nemec wrote: Subject: Re: [Tutor] string list in alphabetical! To: tutor@python.org Date: Monday, October 21, 2013, 1:21 PM On 10/21/2013 01:16 PM, Steven D'Aprano wrote: > On Sun, Oct 20, 2013 at 09:15:05

Re: [Tutor] Tutor] string list in alphabetical!

2013-10-21 Thread bob gailer
On 10/21/2013 12:16 PM, Siva Cn wrote: Hi Sammy, Try this this may help you ! -- def sort_file1_to_file2(file1, file2): """.""" input_content = [] with open(file1, 'r') as fp: input_content = fp.

[Tutor] Tutor] string list in alphabetical!

2013-10-21 Thread Siva Cn
Hi Sammy, Try this this may help you ! -- def sort_file1_to_file2(file1, file2): """.""" input_content = [] with open(file1, 'r') as fp: input_content = fp.read() input_content = input_content

Re: [Tutor] string list in alphabetical!

2013-10-21 Thread Sammy Cornet
I appreciate your help and advices in concern of my challenge. In fact, I'm confuse because I was sent a lot of lesson in comparison to what I usually have for each week. I will try it the you told me. Think you for all of your email. On Oct 21, 2013, at 4:08, "Sammy Cornet" wrote: > Thank yo

Re: [Tutor] string list in alphabetical!

2013-10-21 Thread Lukas Nemec
On 10/21/2013 01:16 PM, Steven D'Aprano wrote: On Sun, Oct 20, 2013 at 09:15:05PM -0500, Sammy Cornet wrote: Thank you for help Steven! I intend to correct it. But also I would like to know if I wrote the correctly in order to the output that I'm looking for? I don't know, I didn't study your c

Re: [Tutor] string list in alphabetical!

2013-10-21 Thread Steven D'Aprano
On Sun, Oct 20, 2013 at 09:15:05PM -0500, Sammy Cornet wrote: > Thank you for help Steven! I intend to correct it. But also I would > like to know if I wrote the correctly in order to the output that I'm > looking for? I don't know, I didn't study your code in that much detail. Why don't you fi

Re: [Tutor] string list in alphabetical!

2013-10-21 Thread Alan Gauld
On 21/10/13 01:16, Sammy Cornet wrote: so here is what I have on my script: OK some comments below... infile = open('Desktop/unsorted_fruits.docx' ,"r") outfile = open('Desktop/sorted_fruits.docx', 'w') You probably want to use txt files. def find(): index = 0 while index < 26:

Re: [Tutor] string list in alphabetical!

2013-10-21 Thread Sammy Cornet
Thank you for help Steven! I intend to correct it. But also I would like to know if I wrote the correctly in order to the output that I'm looking for? On Oct 20, 2013, at 19:22, "Sammy Cornet" wrote: > Hello! > > I'm using python 2.7.5 version and I'm trying to write a program related to a

Re: [Tutor] string list in alphabetical!

2013-10-20 Thread Mark Lawrence
On 21/10/2013 01:16, Sammy Cornet wrote: Hello! I'm using python 2.7.5 version and I'm trying to write a program related to a file named unsorted_fruits.txt contains a list of 26 fruits, each one with a name that begins with a different letter of the alphabet. My program's goal is to read in the

Re: [Tutor] string list in alphabetical!

2013-10-20 Thread Steven D'Aprano
On Sun, Oct 20, 2013 at 07:16:12PM -0500, Sammy Cornet wrote: > Hello!I'm using python 2.7.5 version and I'm trying to write a program > related to a file named unsorted_fruits.txt contains a list of 26 .^ Here you say the file is called unsorted_frui

[Tutor] string list in alphabetical!

2013-10-20 Thread Sammy Cornet
Hello!I'm using python 2.7.5 version and I'm trying to write a program related to a file named unsorted_fruits.txt contains a list of 26 fruits, each one with a name that begins with a different letter of the alphabet. My program's goal is to read in the fruits from the file unsorted_fruits.txt