As you can see, we've prepared the
text variable in the Code Editor. This variable contains quite a long string of characters. Your task is to iterate over the characters of the string, count the number of uppercase letters and lowercase letters, and print the result:
You can use the
string.isupper() to check if a string contains lowercase or uppercase characters. The
islower() method checks whether a string contains lowercase letters only. If this is the case, it returns
True. Otherwise, it returns
name = 'Jane'