' ' '
if word in Uppercase and word[1::] in lowercase:
elif word[0::] in lowercase:
elif word[0::] in Uppercase:
' ' '
I read the posts and I know there are better ways of doing it, but can anyone tell me the mistake in my code?
Its not working
A single capital letter is not necessarily always true. Given the case "gooGle" there is one single capital letter but this would be returned false. We need to check to make sure the single capital letter is at the beginning of the word.
@livelear the if check is extraneous in my opinion since python will convert a bool to 0 or 1. The check does make the intent of u or total more explicit. It's a matter of opinion and coding style at thisbe point.