I know what you mean (although I don't understand "Python" at all, I was thinking of writing something like that in vb)
Basically It guesses x++ for every "x ^ x = c" where c is the value given (starting from x=0). If it goes over c, it goes back one, then it does x = x + 0.1 same thing. Then x = x + 0.01 etc.
But, what I want to understand is how to do it the long way, meaning the Taylor series way...
An interesting thing I notice is it can't go below ln(0.4~ ^ 0.4~)