Re: [Tutor] Tutor Digest, Vol 56, Issue 22

2008-10-05 Thread Lie Ryan
On Mon, 2008-10-06 at 05:32 +0200, [EMAIL PROTECTED] wrote: > > Message: 8 > Date: Sun, 5 Oct 2008 20:27:39 -0700 > From: Anthony Smith <[EMAIL PROTECTED]> > Subject: [Tutor] first call - newcomer > To: > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > > Thi

[Tutor] first call - newcomer

2008-10-05 Thread Anthony Smith
This is my first post - I will be brief... One: I have programmed before - but it has been DECADES...so just a few simple queries: 1. A brief (but complete) description regarding the use of script editor (I will be using command prompt in Windows), as: a. details about loa

[Tutor] IF statements

2008-10-05 Thread WM
I used to do Basic and enjoyed it. Someone said Python was a vastly better language than Visual Basic, which I considered playing with. So I sought to give it a go but struck a sticking point very early. I am now going through the Python tutorial. All went well until I came to IF. The code b

Re: [Tutor] dealing with user input whose value I don't know

2008-10-05 Thread Alan Gauld
"Omer" <[EMAIL PROTECTED]> wrote Here is the code: def main(): import string "import string" is unnecessary, mate. Not entirely true since the code uses string.split() However since the split method of the string could be used instead then that would indeed render the import unnecessa

Re: [Tutor] More Pythonesque or a more efficient method

2008-10-05 Thread Robert Berman
Kent, Thank you for two excellent suggestions. I will implement your  suggestion of indexing by the sorted letters in the word. Robert Kent Johnson wrote: On Sun, Oct 5, 2008 at 1:52 PM, Robert Berman <[EMAIL PROTECTED]> wrote: The database item consists of the key; the actual

Re: [Tutor] More Pythonesque or a more efficient method

2008-10-05 Thread Kent Johnson
On Sun, Oct 5, 2008 at 1:52 PM, Robert Berman <[EMAIL PROTECTED]> wrote: > The database item consists of the key; the actual word, and the value, the > size as a string. For example, the word 'myth' is represented as key= > 'myth', value = '4'. I think the slow part of the algorithm is the script

Re: [Tutor] PYTHON 26 DOESN'T MATCH TUTORIAL

2008-10-05 Thread Kent Johnson
On Sun, Oct 5, 2008 at 3:44 AM, WM <[EMAIL PROTECTED]> wrote: > I am trying to learn PYTHON from scratch using two screens; the tutor and > IDLE. The first two lessons went OK but the third (IF and ELSE IF) just do > not work. When I try ELSE I get >>> without any further indent. When I did > CO

[Tutor] More Pythonesque or a more efficient method

2008-10-05 Thread Robert Berman
Hi, The below script which prints anagrams available for any word available within a given database. It does work, but it is not very fast. I am relatively certain there are more Python friendly coding techniques but I am more concerned with a faster algorithm. The database item consists of

Re: [Tutor] dealing with user input whose value I don't know

2008-10-05 Thread Omer
On Fri, Oct 3, 2008 at 9:45 AM, David <[EMAIL PROTECTED]> wrote: > Here is the code: > > def main(): > import string > Hey, lagging a bit behind the list, "import string" is unnecessary, mate. ___ Tutor maillist - Tutor@python.org http://mail.pytho