Mac OS 10.10
Python 3.4.3
I self-study Python and am using it for a Coursera algorithm class.
Hi! My script sorts correctly on all my test arrays. My accumulator variable
to count the number of comparisons returns nonsense. I'm counting the (length
- one) of each sublist that will be sorted
On 29/10/15 19:11, Patti Scott via Tutor wrote:
Caveat: I didn't check the algorithms for correctness,
I'll just take your word for that.
My accumulator variable to count the number of comparisons returns nonsense.
def quick_sort(A, start, stop, count):
if start < stop:
#
Thanks Meenu.
str.translate.
Worked like a charm for python 3.5.
And thanks Alan Gauld for the 2.7 version.
Appreciate the help guys. You guys are awesome.
Regards
Vusa
On Wed, Oct 28, 2015 at 6:23 PM, meenu ravi wrote:
> Hi Vusa,
>
> I was not able to reply
On 28/10/2015 18:06, Alan Gauld wrote:
On 28/10/15 17:35, Peter Otten wrote:
Alan Gauld wrote:
On 28/10/15 16:37, Peter Otten wrote:
'The cow moos louder than the frog'.translate(str.maketrans("", "",
"aeiouAEIOU"))
'Th cw ms ldr thn th frg'
Even easier, forget the maketrans stuff and