ps3, problem 2 Hello What are other approaches for solving problem 2 in ps3? http://dpaste.com/hold/693698/
Thank you very much
subStringMatchExact1 returns TypeError: bad operand type for unary +: 'tuple'
do you know how to fix it?
Actually, no That what was killing in the first place. Well, I was trying not exactly the same way, but there were similar type error
So, as I wrote in another question, I've spent 2 day in tuples, strings and recursion and did not come up with answer. So now I am starting to suspect that words 'These problems can be solved with either an iterative function or a recursive one' were just exaggeration (regarding to problem2) .
.. you Can write either an iterative or recursive solution
your last function return wrong answer
yes, I can agree it was stupid to spend 2 days trying to find unnecessary extrasolution
yep - i was flirting with processing the result after the fact, while wrong the information is there. http://pastebin.com/jLEMVG38
Join our real-time social learning platform and learn together with your friends!