At 08:28 PM 4/25/2008, Kent Johnson wrote:
Dick Moores wrote:
I have the feeling that I've either forgotten (or never knew) some
basic Python built-in or something, but in case I haven't, what's
the best way to convert a list of integers to a string?
I dunno about 'best', but here is one way
Dick Moores wrote:
I have the feeling that I've either forgotten (or never knew) some basic
Python built-in or something, but in case I haven't, what's the best way
to convert a list of integers to a string?
I dunno about 'best', but here is one way to do it:
''.join(map(str, intList))
Perhap
I have the feeling that I've either forgotten (or never knew) some basic
Python built-in or something, but in case I haven't, what's the best way
to convert a list of integers to a string? Here are two I've come
up with. Although intListToString2() is the more Pythonic,
intListToString1() is the
Sanhita Mallick wrote:
I am struggling with a simple recurring function
What is a recurring function? Do you mean looping?
Here is the script. T(i) are trees (as in graphs).
The program operates great, until the step where
norm_ted is calculated. Mysteriously norm_ted becomes
0, even though
Sanhita Mallick wrote:
Hi.
I am struggling with a simple recurring function, but
can't understand why this is happening. Please help.
Here is the script. T(i) are trees (as in graphs).
The program operates great, until the step where
norm_ted is calculated. Mysteriously norm_ted becomes
0, even
Hi.
I am struggling with a simple recurring function, but
can't understand why this is happening. Please help.
Here is the script. T(i) are trees (as in graphs).
The program operates great, until the step where
norm_ted is calculated. Mysteriously norm_ted becomes
0, even though "mag" value is ca
However I suspect any attempt to improve performance
here needs a new algorithm and probably a clever data
structure to minimise brute force tests.
If I knew of one, I would have used it :)
I'd suggest googling for 'trie'. Tries are method of
indexing sets of strings by prefix.
As I recall
Vaibhav.bhawsar wrote:
I have been trying to get the DictCursor working with mysqldb module but
can't seem to. I have pasted the basic connection code and the traceback
from pydev. The connection does open with the default cursor class.
can't figure out how to use the dict cursor class instead
"R. Alan Monroe" <[EMAIL PROTECTED]> wrote
That effectively means join is getting called at 6 levels
of loop nesting for just one recursive call, but you could
be doing more than that.
I'm doing zip and list comprehension just as often, and they don't
make a blip in the profiler. Maybe that's