Re: 2-dimensional data structures

2006-02-18 Thread anthonyberet
Tim Chase wrote: I want to work on a sudoku brute-forcer, just for fun. Well, as everybody seems to be doing these (self included...), the sudoku solver may become the hello world of the new world :) What is the equivalent way to store data in python? - It isn't obvious to me how to

2-dimensional data structures

2006-01-26 Thread anthonyberet
Hello again - rather a newbie here... I want to work on a sudoku brute-forcer, just for fun. I am considering different strategies, but first I need to decide on the data-structure to use for the progress/solution grid. This being a square, I would have used a 9x9 2-dimensional array in my

calling functions

2005-08-01 Thread anthonyberet
This is the first time I have tried out functions (is that the main way of making subroutines in Python?) Anyway, my function, mutate, below #make a child string by randomly changing one character of the parent Def mutate(): newnum=random.randrange(27) if newnum==0:

string methods

2005-07-30 Thread anthonyberet
I am an abject newbie, so mock away (actually no-one ever does that in this group..) Anyway, I want to replace one character in a string, based in that character's position in the string. For example if I wanted to replace the 4th character in 'foobar' (the b)with the contents of another

How do you program in Python?

2005-07-03 Thread anthonyberet
My question isn't as all-encompassing as the subject would suggest... I am almost a Python newbie, but I have discovered that I don't get along with IDLE, as i can't work out how to run and rerun a routine without undue messing about. What I would really like is something like an old-style

Re: TKinter

2005-02-28 Thread anthonyberet
Steve Holden wrote: anthonyberet wrote: So, is it pronounced 'Tee-Kinter', or 'Tee-Kay-Inter'? I don't want to appear as a dork down the pub. If anyone down your pub knows enough about Python to understand what TKinter is I very much doubt they'll be rude enough to call you a dork

Re: string methods (warning, newbie)

2005-02-27 Thread anthonyberet
Jimmy Retzlaff wrote: Anthonyberet wrote: Is there a string mething to return only the alpha characters of a string? eg 'The Beatles - help - 03 - Ticket to ride', would be 'TheBeatlesTickettoride' If not then how best to approach this? I have some complicated plan to cut the string

TKinter

2005-02-27 Thread anthonyberet
So, is it pronounced 'Tee-Kinter', or 'Tee-Kay-Inter'? I don't want to appear as a dork down the pub. -- http://mail.python.org/mailman/listinfo/python-list

string methods (warning, newbie)

2005-02-26 Thread anthonyberet
Is there a string mething to return only the alpha characters of a string? eg 'The Beatles - help - 03 - Ticket to ride', would be 'TheBeatlesTickettoride' If not then how best to approach this? I have some complicated plan to cut the string into individual characters and then concatenate a new

Re: string methods (warning, newbie)

2005-02-26 Thread anthonyberet
anthonyberet wrote: Is there a string mething [method] to return only the alpha characters of a string? eg 'The Beatles - help - 03 - Ticket to ride', would be 'TheBeatlesTickettoride' erm, no it wouldn't, it would be 'TheBeatleshelpTickettoride', but you get me, I am sure. If not then how

Re: newbie wants to compile python list of filenames in selected directories

2005-02-08 Thread anthonyberet
M.E.Farmer wrote: anthonyberet wrote: Hi, I am new at Python, and very rusty at the one language I was good at, which was BASIC. I want to write a script to compare filenames in chosen directories, on windows machines. Ideally it would compose a list of strings of all the filenames

newbie wants to compile python list of filenames in selected directories

2005-02-06 Thread anthonyberet
Hi, I am new at Python, and very rusty at the one language I was good at, which was BASIC. I want to write a script to compare filenames in chosen directories, on windows machines. Ideally it would compose a list of strings of all the filenames in the directories, and those directories would