Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Caps Lock by Pavellver
def caps_lock(text: str) -> str:
result, caps = '', False
for letter in text:
if letter == 'a':
caps = not caps
else:
result += letter if not caps else letter.upper()
return result
May 22, 2023
Comments: