> Now there is another solution. A palindrom is made of two symetric halves,
> with (odd len) or without (even len) a single char between the symetric
> halves, ie :
>
> * odd : ABCBA ('AB' + 'C' + 'BA')
> * even : ABCCBA ('ABC' + 'CBA')
>
> So you just have to extract the symetric halves, reverse
On Fri, Aug 27, 2010 at 10:51 PM, Jussi Piitulainen
wrote:
> MRAB writes:
>> On 27/08/2010 20:43, Jussi Piitulainen wrote:
>>> Dave Angel writes:
Jussi Piitulainen wrote:
> Agreed. But is there any nicer way to spell .reverse than [::-1]
> in Python? There is .swapcase() but no .rever
On Fri, Aug 27, 2010 at 11:47 PM, Richard Arts wrote:
> On Fri, Aug 27, 2010 at 10:51 PM, Jussi Piitulainen
> wrote:
>> MRAB writes:
>>> On 27/08/2010 20:43, Jussi Piitulainen wrote:
>>>> Dave Angel writes:
>>>>> Jussi Piitulainen wrote:
&g
These are also mere suggestions.
The statements you use in your print statement and the one you use to
feed the cursor differ slightly. The latter is missing quotes around
your search criterium.
Isn't it possible to fetch results row by row and see if the missing
row is in the set? That way you c