I tried this code but it is returnig the whole sentence instead of just the uppercases letters
def find_message(text: str) -> str:
a = 0 b = [] while a < len(text): if text[a].isupper: b.append(text[a]) a = a + 1 else: a = a + 1 else: return ''.join(b)