str 클래스에 isupper() islower() 함수가 있다. lower(), upper()도 있다. 던더함수가 아니기에 len(str)처럼 작동하지는 않고 str.lower() 식으로 사용해야된다.
int()는 int 타입클래스를 만들며, 안에 내용물이 constructor arguement이다. 예를 들어 “42”이면 그걸로 42라는 int 타입클래스 인스턴스를 만들고, int.call() → int.new() 과정을 거친다. 정확히는 type.call(int,”42”) → int.new ….
N = int(input())
user_input = input()
result = ''
for ch in user_input:
result += ch.lower() if ch.isupper() else ch.upper()
print(result)