Search⌘ K

Find Uppercase Letter in String

Explore methods to identify the first uppercase letter in a string by implementing both iterative and recursive algorithms in Python. This lesson equips you with practical coding techniques to handle string processing, enhancing your understanding of recursion and iteration for real-world programming challenges.

We'll cover the following...

In this lesson, given a string, we develop an algorithm to return the first occurring uppercase letter. We will solve this problem using an iterative and recursive approach:

For instance, for the strings:

str_1 = "lucidProgramming"
str_2 = "LucidProgramming"
str_3 = "lucidprogramming"

The algorithm should return P L, and output a message indicating that no capital letter was found for str_1, str_2, and str_3, respectively. ...