Die Aufgabe wird geladen…
Sometimes you need to quickly flip the case of text: uppercase letters become lowercase, and lowercase letters become uppercase. Write a function toggle_case that takes a string s and returns a new string with the case of each letter changed. Characters that do not have case can stay unchanged.
"Hello""hELLO""abc""ABC""ABC""abc"def toggle_case(s: str) -> str:
Melde dich an, um den Einreichungsverlauf zu sehen
AnmeldenMelde dich an, um den KI-Mentor zu nutzen
Anmelden"Hello""hELLO""abc""ABC""ABC""abc""123""123""PyThOn""pYtHoN""HELLO""hello"