On 4/30/2016 10:11 AM, Stephen Hansen wrote:
You're thinking of the whole "string", but you're operating on single-character substrings, and when " ".islower() is run, its false. Because the two-pronged test, a) if all cased characters are lowercase and b) there is at least one cased character. b) is failing. Ergo, you're getting the underscores.

I see where the problem lies in my thinking. I went looking for a single line solution for the whole string. If I had constructed a for loop and tried to reduce it to a single line, I *may* have understood the relationship between the different parts. Or maybe not. Blaming the documentation is a lot easier. ;)

Thank you,

Chris R.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to