Problem:


Toggling Cases

  Write a program which converts uppercase/lowercase letters to lowercase/uppercase for a given string.

Input

  A string is given in a line.

Output

  Print the converted string in a line. Note that you do not need to convert any characters other than alphabetical letters.

Constraints

The length of the input string < 1200

Sample Input

fAIR, LATER, OCCASIONALLY CLOUDY.

Sample Output

Fair, later, occasionally cloudy.



Sample input:
fAIR, LATER, OCCASIONALLY CLOUDY.


Sample output:
Fair, later, occasionally cloudy.

Submission status: Wrong Answer

Solution code:
values = input().split(". ")
result = ""
for value in values:
    result += value.swapcase()
print(result)

Submission status: Wrong Answer

Solution code:
print(input().swapcase)

Submission status: Wrong Answer

Solution code:
S = input()
S.upper()

Submission status: Wrong Answer

Solution code:
S = input()
S.upper()
print()

Submission status: Wrong Answer

Solution code:
S = input()
S.upper()
print(S.upper())

Submission status: Wrong Answer

Solution code:
S = input()
S.capitalize()
print(S.capitalize())

Submission status: Wrong Answer

Solution code:
from sys import stdin

s = list(stdin.readline())
print(s)
for i in range(len(s)):
    if s[i].islower():
        s[i] = s[i].upper()
    elif s[i].isupper():
        s[i] = s[i].lower()

print(*s, sep="")

Submission status: Wrong Answer

Solution code:
Target=input()
Target.swapcase()
print(Target)

Submission status: Wrong Answer

Solution code:
a = input()
a.swapcase()
print(a)

Submission status: Wrong Answer

Solution code:

Submission status: Wrong Answer

Solution code:
char = input()
print(char.lower())

Submission status: Wrong Answer

Solution code:
print(input().capitalize())

Submission status: Wrong Answer

Solution code:
s = "fAIR, LATER, OCCASIONALLY CLOUDY."
print(s.swapcase())

Submission status: Wrong Answer

Solution code:
s=input()
for c in s:
  if 'A' <= c and c <= 'Z':
    print(c.lower(), end='')
  elif 'a' <= c and c <= 'z':
    print(c.upper(), end='')
  else:
    pass

Submission status: Wrong Answer

Solution code:
s=input()
for c in s:
  if 'A' <= c and c <= 'Z':
    print(c.lower(), end='')
  elif 'a' <= c and c <= 'z':
    print(c.upper(), end='')
  else:
    print(c)

Submission status: Wrong Answer

Solution code:
str = raw_input()
for a in list(str):
    if a.islower():
        print a.upper()
    elif a.isupper():
        print a.lower()
    else:
        print a

Submission status: Wrong Answer

Solution code:
import sys
A=input().split()
print(A)
for i in A:
	sys.stdout.write(i.swapcase())
	sys.stdout.write(" ")
print()

Submission status: Wrong Answer

Solution code:
string = input()
for i in range(len(string)):
    if string[i].isupper():
        string = string.replace(string[i], string[i].lower(), 1)
    elif string[i].islower():
        string = string.replace(string[i], string[i].upper(), 1)
print(string)

Submission status: Wrong Answer

Solution code:
string = input()
if len(string) == 1:
    print(string)
else:
    for i in range(len(string)):
        if string[i].isupper():
            string = string.replace(string[i], string[i].lower(), 1)
        elif string[i].islower():
            string = string.replace(string[i], string[i].upper(), 1)
    print(string)

Submission status: Wrong Answer

Solution code:
string = input()
if len(string) == 0:
    print(string)
else:
    for i in range(len(string)):
        if string[i].isupper():
            string = string.replace(string[i], string[i].lower(), 1)
        elif string[i].islower():
            string = string.replace(string[i], string[i].upper(), 1)
    print(string)

Submission status: Wrong Answer

Solution code:
print(input().upper())

Submission status: Wrong Answer

Solution code:
print( "Aa??????".swapcase() )

Submission status: Wrong Answer

Solution code:
my_str = input()

for i in range(len(my_str)):
    if "a"<=my_str[i]<="z":
        print(my_str[i].upper(),end='')
    if "A"<=my_str[i]<="Z":
        print(my_str[i].lower(),end='')
    else:
        print(my_str[i],end='')

Submission status: Wrong Answer

Solution code:
a = "python"

print(a.upper())

Submission status: Wrong Answer

Solution code:
print('abcDEFghi'.swapcase())

Submission status: Wrong Answer

Solution code:
my_str = input()

for i in range(len(my_str)):
    if "a"<=my_str[i]<="z":
        print(my_str[i].upper())
    elif "A"<=my_str[i]<="Z":
        print(my_str[i].lower())
    else:
        print(my_str[i])

Submission status: Wrong Answer

Solution code:
ATK = input()

for i in range(len(ATK)):
    if "a" <=ATK[i]<="z":
        print(ATK[i].upper, end='')

    elif "A"<=ATK[i]<="Z":
        print(ATK[i].lower, end='')

    else:
        print(ATK[i], end='')

Submission status: Wrong Answer

Solution code:
print( "fAIR, LATER, OCCASIONALLY CLOUDY".swapcase() )

Submission status: Wrong Answer

Solution code:
print(" ".swapcase())
print("fAIR, LATER, OCCASIONALLY CLOUDY")

Submission status: Wrong Answer

Solution code:
print(' '.swapcase())

Submission status: Wrong Answer

Solution code:
print('1200'.swapcase())

Submission status: Wrong Answer

Solution code:
print(" ".swapcase())

Submission status: Wrong Answer

Solution code:
print("".swapcase())

Submission status: Wrong Answer

Solution code:
print(''.swapcase())

Submission status: Wrong Answer

Solution code:
print("Aa??????".swapcase())

Submission status: Wrong Answer

Solution code:
print("Aa".swapcase())

Submission status: Wrong Answer

Solution code:
str = " ";
print(str.swapcase())

Submission status: Wrong Answer

Solution code:
str = ' ';
print(str.swapcase())

Submission status: Wrong Answer

Solution code:
str = "this is string example....wow!!!";
print(str.swapcase())

Submission status: Wrong Answer

Solution code:
s = input()
print(s.swapcase)

Submission status: Wrong Answer

Solution code:
a = input()
a.swapcase()
print(a)

Submission status: Wrong Answer

Solution code:
input = raw_input()
output = ""

for i in input:
    if i.islower():
        output += i.upper()
    elif i.isupper():
        output += i.lower()

print(output)

Submission status: Wrong Answer

Solution code:
raw_input().swapcase()

Submission status: Wrong Answer

Solution code:
s=list(input())
for i in range(len(s)):
	if s[i].isalnum():
		if s[i].islower():
			s[i]=s[i].upper()
		elif s[i].isupper():
			s[i]=s[i].lower()
print(str(s))

Submission status: Wrong Answer

Solution code:
S = raw_input()
T = ""
for x in S:
    if x.islower():
        T += x.upper()
    if x.isupper():
        T += x.lower()
print T

Submission status: Wrong Answer

Solution code:
'''
ITP-1_8-A
 ??§????????¨?°????????????\?????????
????????????????????????????°?????????¨??§???????????\????????????????????°????????????????????????????????????
???Input
????????????1???????????????????????????
???Output
????????????????????????????°?????????¨??§???????????\????????????????????????????????????????????????
??¢????????????????????\???????????????????????????????????????????????????
'''
# inputData
inputData = input()

for i in range(len(inputData)):
    if "a"<=inputData[i]<="z":
        # ??§????????????
        print(inputData[i].upper(),end='')
    elif "A"<=inputData[i]<="Z":
        # ?°?????????????
        print(inputData[i].lower(),end='')

Submission status: Wrong Answer

Solution code:
inp = input()
inp.swapcase()
print(inp)

Submission status: Wrong Answer

Solution code:
words = input().split(" ")
for word in words:
    for w in word:
        if w.isupper():
            w.lower()
        else:
            w.upper()
print(",".join(words))

Submission status: Wrong Answer

Solution code:
x=input().lower()
print(x)

Submission status: Wrong Answer

Solution code:
s = input()
s.swapcase()
print(s)

Submission status: Wrong Answer

Solution code:
words = input().split()
for word in words:
    print(word.swapcase())

Submission status: Wrong Answer

Solution code:
''' In the name of Allah, shakil_shaikh'''
x=raw_input().capitalize()
print x

Submission status: Wrong Answer

Solution code:
s=input();u=s.upper();l=s.lower()
print(*[(l[i],u[i])[s[i]==u[i]]for i in range(len(s))])

Submission status: Wrong Answer

Solution code:
s=input();u=s.upper();l=s.lower()
print(''.join([(l[i],u[i])[s[i]==u[i]]for i in range(len(s))]))

Submission status: Wrong Answer

Solution code:
s = input()
end = ''
for h,i in enumerate(list(s)):
    if ord(i) in range(ord('A'), ord('Z')):
        print(i.lower(), end=end)
    elif ord(i) in range(ord('a'), ord('z') + 1):
        print(i.upper(), end=end)
    else:
        print(i, end=end)
print()

Submission status: Wrong Answer

Solution code:
sentence=input()
print(sentence.upper())

Submission status: Wrong Answer

Solution code:
a=str(input())
print(a.swapcase)

Submission status: Wrong Answer

Solution code:
# coding: UTF-8
moji = raw_input().split(",")
for i in range(len(moji)):
    print(moji[i].swapcase())
print ",".join(moji)

Submission status: Wrong Answer

Solution code:
# coding: UTF-8
moji = raw_input().split(",")
for i in range(len(moji)):
    print(moji[i].swapcase())
print ", ".join(moji)

Submission status: Wrong Answer

Solution code:
# coding: UTF-8
moji = raw_input().split(",")
for i in range(len(moji)):
    moji[i].swapcase()
print ", ".join(moji)

Submission status: Wrong Answer

Solution code:
input = raw_input()

char_list = list(input)

for val in char_list:
    if val.isupper():
        print(val.upper())   
    else:
        print(val.lower())

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

char = input()

char.swapcase()

print(char)

Submission status: Wrong Answer

Solution code:
print(input().capitalize())

Submission status: Wrong Answer

Solution code:
i = input()
print(i.capitalize())

Submission status: Wrong Answer

Solution code:
sen = input()
print(sen.capitalize())

Submission status: Wrong Answer

Solution code:
sen = input()
for i in sen:
    print(i.capitalize(), end="")

Submission status: Wrong Answer

Solution code:
x = raw_input()

print x.upper()

Submission status: Wrong Answer

Solution code:
for x in raw_input():
    if x.islower():
        print x.upper()
    else:
        print x.lower()

Submission status: Wrong Answer

Solution code:
for x in raw_input():
    if x.islower():
        x.upper()
    else:
        x.lower(),
print (" ".join(map(str, x)))

Submission status: Accepted

Solution code:
def main():
    print(input().swapcase())

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
print(input().swapcase())

Submission status: Accepted

Solution code:
def main():
    line = input()

    for ch in line:
        if   65 <= ord(ch) <= 90:
            ch = chr(ord(ch)+32)
        elif 97 <= ord(ch) <= 122:
            ch = chr(ord(ch)-32)

        print(ch, end='')
    print()

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
tr = str.maketrans('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
                   ,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
input_text = input().translate(tr)

print(input_text)

Submission status: Accepted

Solution code:
s = input()
ans = [i.upper() if 'a' <= i <= 'z' else i.lower() if 'A' <= i <= 'Z' else i for i in s[:]]
print(*ans, sep='')

Submission status: Accepted

Solution code:
# coding: utf-8
print(input().swapcase())

Submission status: Accepted

Solution code:
a = input()
print(a.swapcase())

Submission status: Accepted

Solution code:
s = input()
t = ""
for i in range(len(s)):
    if s[i].islower():
        t += s[i].upper()
    elif s[i].isupper():
        t += s[i].lower()
    else:
        t += s[i]
print(t)

Submission status: Accepted

Solution code:
s = input()
print(s.swapcase())

Submission status: Accepted

Solution code:
s = raw_input().swapcase()
print s

Submission status: Accepted

Solution code:
s = input()
print(s.swapcase())

Submission status: Accepted

Solution code:
# クレバーだけどなんか強引なバージョン

from string import ascii_lowercase, ascii_uppercase
s = input()
table = str.maketrans(dict(zip(ascii_lowercase+ascii_uppercase,
                               ascii_uppercase+ascii_lowercase)))
print(s.translate(table))

Submission status: Accepted

Solution code:
print(input().swapcase())

Submission status: Accepted

Solution code:
lit=input()
print(lit.swapcase())

Submission status: Accepted

Solution code:
from string import ascii_lowercase, ascii_uppercase
l = ascii_lowercase
u = ascii_uppercase
def conv(c):
    if c in l:
        return u[l.index(c)]
    if c in u:
        return l[u.index(c)]
    return c
open(1, 'w').write("".join(map(conv, open(0).readline())))

Submission status: Accepted

Solution code:
string = str(input())

print(string.swapcase())

Submission status: Accepted

Solution code:
C = input()
print(C.swapcase())

Submission status: Accepted

Solution code:
S = input()
S.swapcase()
print(S.swapcase())

Submission status: Accepted

Solution code:
from sys import stdin

s = list(stdin.readline())
for i in range(len(s)):
    if s[i].islower():
        s[i] = s[i].upper()
    elif s[i].isupper():
        s[i] = s[i].lower()

print(*s, sep="", end="")

Submission status: Accepted

Solution code:
from sys import stdin

s = stdin.readline().swapcase()
print(s, end="")

Submission status: Accepted

Solution code:
text = input()
print(text.swapcase())

Submission status: Accepted

Solution code:
x = input()
print(x.swapcase())

Submission status: Accepted

Solution code:
sentence = input()
for i in sentence:
    if i.isupper() == True:
        print(i.lower(), end = "")
    elif i.islower() == True:
        print(i.upper(), end = "")
    else:
        print(i, end = "")
print()

Submission status: Accepted

Solution code:
moji = input()

print(moji.swapcase())

Submission status: Accepted

Solution code:
string=input()
print(string.swapcase())

Submission status: Accepted

Solution code:
target=input()
Ans=target.swapcase()
print(Ans)

Submission status: Accepted

Solution code:
#coding: UTF-8

buf = list(str(input()))
for i in range(len(buf)):
    if buf[i].isupper() == True:
        buf[i] = buf[i].lower()
        buf_changed = "".join(buf)
    elif buf[i].islower() == True:
        buf[i] = buf[i].upper()
        buf_changed = "".join(buf)

print(buf_changed)

Submission status: Accepted

Solution code:
a = input()
print(a.swapcase())

Submission status: Accepted

Solution code:

print(input().swapcase())

Submission status: Accepted

Solution code:
n=input()
m=''

for i in range(len(n)):
    c=str(n[i])
    
    if(n[i].islower()):
        c=n[i].upper()
    elif(n[i].isupper()):
        c=n[i].lower()
    
    m+=c

print(m)

Submission status: Accepted

Solution code:
str = input()
str = str.swapcase()
print(str)

Submission status: Accepted

Solution code:
char = input()
print(char.swapcase())

Submission status: Accepted

Solution code:
s = input()

for c in s:
    if c.islower():
        print(c.upper(), end="")
    else:
        print(c.lower(), end="")
print()

Submission status: Accepted

Solution code:
s = input("")
print(s.swapcase())

Submission status: Accepted

Solution code:
m=str(input())
print(m.swapcase())

Submission status: Accepted

Solution code:
s=input()
for c in s:
  if 'A' <= c and c <= 'Z':
    print(c.lower(), end='')
  elif 'a' <= c and c <= 'z':
    print(c.upper(), end='')
  else:
    print(c,end='')
print()

Submission status: Accepted

Solution code:
s = raw_input()
r = ''
for c in s:
    d = c
    if c >= 'a' and c <= 'z':
        d = chr(ord(c) - ord('a') + ord('A'))
    if c >= 'A' and c <= 'Z':
        d = chr(ord(c) - ord('A') + ord('a'))
    r = r + d
print r

Submission status: Accepted

Solution code:
s = raw_input()
ans = ""
for i in range(len(s)):
    if('A' <= s[i] and s[i] <= 'Z'):
        ans += s[i].lower()
    elif('a' <= s[i] and s[i] <= 'z'):
        ans += s[i].upper()
    else:
        ans += s[i]
print(ans)

Submission status: Accepted

Solution code:
print(input().swapcase())

Submission status: Accepted

Solution code:
text = raw_input()
t = list(text)
for i in range(len(t)):
    if t[i].isupper():
        t[i] = t[i].lower()
    elif t[i].islower():
        t[i] = t[i].upper()
print "".join(t)

Submission status: Accepted

Solution code:
n=raw_input()
a=''
for i in n:
    if i.islower():a+=i.upper()
    else:a+=i.lower()
print a

Submission status: Accepted

Solution code:
import string
s = raw_input()
print string.swapcase(s)

Submission status: Accepted

Solution code:
str = raw_input()
li = []
for a in list(str):
    if a.islower():
        li.append(a.upper())
    elif a.isupper():
        li.append(a.lower())
    else:
        li.append(a)
print "".join(li)

Submission status: Accepted

Solution code:
slist = raw_input().split(" ")

new_str_list=[]
for s in slist:
    new_str = ""
    for c in s:
        if c.isupper():
            new_str += c.lower()
        else:
            new_str += c.upper()
    new_str_list.append(new_str)

print " ".join(new_str_list)

Submission status: Accepted

Solution code:
slist = raw_input().split(" ")

def conv_char(c):
    if c.isupper(): return c.lower()
    return c.upper()
    
print " ".join(["".join([conv_char(c) for c in s]) for s in slist])

Submission status: Accepted

Solution code:
text = input()

result = ''
for i in range(len(text)):
    code = ord(text[i])
    if ord('A') <= code <= ord('Z'):
        result += chr(code + 32)
    elif ord('a') <= code <= ord('z'):
        result += chr(code - 32)
    else:
        result += chr(code)

print(result)

Submission status: Accepted

Solution code:
text  = input()

result = ''
for i in range(len(text)):
    code = ord(text[i])
    if ord('A') <= code <= ord('Z'):
        result += chr(code + 32)
    elif ord('a') <= code <= ord('z'):
        result += chr(code - 32)
    else:
        result += chr(code)
print(result)

Submission status: Accepted

Solution code:
text = input()

result = ''

for i in range(len(text)):
    code = ord(text[i])
    if ord('A') <= code <= ord('Z'):
        result += chr(code + 32)
    elif ord('a') <= code <= ord('z'):
        result += chr(code - 32)
    else:
        result += chr(code)

print(result)

Submission status: Accepted

Solution code:
import sys
print(sys.stdin.readline().strip().swapcase())

Submission status: Accepted

Solution code:
st = raw_input()
ans = ''
for ch in st:
    if ch.islower():
        ans += ch.upper()
    elif ch.isupper():
        ans += ch.lower()
    else:
        ans += ch
print ans

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    print(input().swapcase())

Submission status: Accepted

Solution code:
#coding:utf-8
#1_8_A 2015.4.7
print(input().swapcase())

Submission status: Accepted

Solution code:
import sys

print( sys.stdin.readline().rstrip().swapcase() )

Submission status: Accepted

Solution code:
import sys

line = sys.stdin.readline()
output = []
for i in range( len( line )-1 ):
	c = ord( line[i] )
	if ord( 'a' ) <= c and c <= ord( 'z' ):
		c = chr( c ).upper()
	elif ord( 'A' ) <= c and c <= ord( 'Z' ):
		c = chr( c ).lower()
	else:
		c = chr( c )
	output.append( c )

print( "".join( output ) )

Submission status: Accepted

Solution code:
# coding: utf-8

line = raw_input()
print ''.join([((s.lower() if s.isupper() else s.upper()) if s.isalpha() else s) for s in line])

Submission status: Accepted

Solution code:
s = raw_input()

s = s.swapcase()

print s

Submission status: Accepted

Solution code:
input = raw_input()

for i in xrange(len(input)):
  # print "i = " + str(i) + ", input[i] = " + input[i]
  if input[i].islower():
    input = input[:i] + input[i].upper() + input[i + 1:]
  elif input[i].isupper():
    input = input[:i] + input[i].lower() + input[i + 1:]

print input

Submission status: Accepted

Solution code:
import string
print raw_input().translate(string.maketrans("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'))

Submission status: Accepted

Solution code:
print raw_input().swapcase()

Submission status: Accepted

Solution code:
S = raw_input()
tmp = ''
for s in S:
    if s.isupper():
        tmp += s.lower()
    elif s.islower():
        tmp += s.upper()
    else:
        tmp += s
print tmp

Submission status: Accepted

Solution code:
#coding:utf-8
#??????????????????????????§??§??????????°??????????????°????????????§???????????????????????????

text = list(raw_input())
for i in range(len(text)) :
	if ord(text[i])<=90 and ord(text[i])>=65:
		text[i] = chr(ord(text[i])+32)
	elif ord(text[i])<=122 and ord(text[i])>=97:
		text[i] = chr(ord(text[i])-32)
print(''.join(text))

Submission status: Accepted

Solution code:
in_line = raw_input()
buf = ""
for i in xrange(len(in_line)):
    if in_line[i].isupper():
        buf += in_line[i].lower()
    elif in_line[i].islower():
        buf += in_line[i].upper()
    else:
        buf += in_line[i]
print buf

Submission status: Accepted

Solution code:
string = raw_input()
ans = ""
for i in string:
    ans += i.swapcase()
print ans

Submission status: Accepted

Solution code:
s = raw_input()
ans = ""
for x in xrange(len(s)):
    if s[x].islower():
        ans += s[x].upper()
    else:
        ans += s[x].lower()
print ans

Submission status: Accepted

Solution code:
# coding: utf-8

import sys

strings = input()

for s in strings:
    if s.islower():
        sys.stdout.write(s.upper())
    else:
        sys.stdout.write(s.lower())
print()

Submission status: Accepted

Solution code:
text = raw_input()
ans = ""
for s in text:
    if s.isalpha():
        ans += s.upper() if s.islower() else s.lower()
    else:
        ans += s
print ans

Submission status: Accepted

Solution code:
import sys

printf = sys.stdout.write

word = map(str, raw_input().split(', '))

count = []
new_word = []
for i in range(len(word)):
    for j in range(len(word[i])):
        if word[i][j].islower():
            new_word.append(chr(ord(word[i][j]) - 32))
        elif word[i][j].isupper(): 
            new_word.append(chr(ord(word[i][j]) + 32))
        else:
            new_word.append(word[i][j])
    new_word.append(", ")


for i in range(len(new_word) - 1):
    printf(new_word[i])
    
print ""

Submission status: Accepted

Solution code:
import sys
A=input().split()
for i in A:
	sys.stdout.write(i.swapcase())
	if i!=A[-1]:
		sys.stdout.write(" ")
print()

Submission status: Accepted

Solution code:
string_list = map(str, raw_input().split(","))

result = [i.swapcase() for i in string_list]
print ",".join(result)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

buf = str(raw_input())
char_list = list(buf)
res = ""

for i in char_list:
    if i.isupper():
        res += i.lower()
    elif i.islower():
        res += i.upper()
    else:
        res += i

print res

Submission status: Accepted

Solution code:
letters = input()
for letter in letters:
    if letter.islower():
        print(letter.upper(), end='')
    elif letter.isupper():
        print(letter.lower(), end='')
    else:
        print(letter, end ='')
print('')

Submission status: Accepted

Solution code:
import string
a = raw_input()
b = ""
for i in range(len(a)):
    if a[i] in string.ascii_lowercase :
        b = b + a[i].upper()
    elif a[i] in string.ascii_uppercase :
        b = b + a[i].lower()
    else :
        b = b + a[i]

print b

Submission status: Accepted

Solution code:
input_line = raw_input()
print input_line.swapcase()

Submission status: Accepted

Solution code:
#   ????????????????????????????°?????????¨??§???????????\????????????????????°??????
#   ?????????????¨??????\?????????????????????
input_str = input()
#   ??§??????????°??????????????°????????????§??????????????????????????????
print(input_str.swapcase())

Submission status: Accepted

Solution code:
# 15-Character-Toggling_Cases.py

# ??§????????¨?°????????????\?????????
# ????????????????????????????°?????????¨??§???????????\????????????????????°????????????????????????????????????

# Input
# ????????????1???????????????????????????

# Output
# ????????????????????????????°?????????¨??§???????????\????????????????????????????????????????????????
# ??¢????????????????????\???????????????????????????????????????????????????

# Constraints
# ??\?????????????????????????????? < 1200
# Sample Input
# fAIR, LATER, OCCASIONALLY CLOUDY.
# Sample Output
# Fair, later, occasionally cloudy.

print( input().swapcase())

Submission status: Accepted

Solution code:
#?????????????????????????????????http://motw.mods.jp/Python/str_methods.html
array = input().swapcase()
print(array)

Submission status: Accepted

Solution code:
print(''.join([c.lower() if c.isupper() else c.upper() if c.islower() else c for c in list(input())]))

Submission status: Accepted

Solution code:
array = input().swapcase()
print(array)

Submission status: Accepted

Solution code:
inputText = input()

print(inputText.swapcase())

Submission status: Accepted

Solution code:
import sys
import math

S = raw_input()

for x in S:
    if "a" <= x <= "z":
        sys.stdout.write(x.upper())
    elif "A" <= x <= "Z":
        sys.stdout.write(x.lower())
    else:
        sys.stdout.write(x)
print

Submission status: Accepted

Solution code:
string = input()
print(string.swapcase())

Submission status: Accepted

Solution code:
I=raw_input()
O=str()
list_upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#list_lower="abcdefghijklmnopqrstuvwxyz"
for i in I:
	if i in list_upper:
		O+=i.lower()
	else:
		O+=i.upper()
print O

Submission status: Accepted

Solution code:
def changeUL(str):
    if(str.islower()):
        return str.upper()
    else:
        return str.lower()
rc=list(map(changeUL,list(input())))
print("".join(rc))

Submission status: Accepted

Solution code:
string = input()
for i in string:
    if i.isupper():
        print(i.lower(), end = "")
    elif i.islower():
        print(i.upper(), end = "")
    else:
        print(i, end = "")
print()

Submission status: Accepted

Solution code:
t = input()
nt = ""
for i in range(len(t)):
    if t[i].islower() :
        nt += t[i].upper()
    elif t[i].isupper() :
        nt += t[i].lower()
    else :
        nt += t[i]

print(nt)

Submission status: Accepted

Solution code:
str = input()

for char in str:
	if char.islower():
		print(char.upper(), end='')
	else:
		print(char.lower(), end='')
print("");

Submission status: Accepted

Solution code:
s = input()
for i in s:
    if(i.isupper()):
        print(i.lower(),end="")
    else:
        print(i.upper(),end="")
print()

Submission status: Accepted

Solution code:
str = input()
new = ''
for i in str:
	if i.islower():
		new +=  i.upper()
	else:
		new += i.lower()
print(new)

Submission status: Accepted

Solution code:
i = input()
print(i.swapcase())

Submission status: Accepted

Solution code:
inputa = input()
 
print(inputa.swapcase())

Submission status: Accepted

Solution code:
s = input()
print(s.swapcase())

Submission status: Accepted

Solution code:
s = input()

for c in s:
    if c.islower():
        print(c.upper(), end="")
    else:
        print(c.lower(), end="")
print()

Submission status: Accepted

Solution code:
letters=[str(x) for x in input().split(", ")]
list1=[]
for i in letters:
    list1.append(i.swapcase())
print(", ".join(list1))

Submission status: Accepted

Solution code:
a = input()
print (a.swapcase())

Submission status: Accepted

Solution code:
uppers = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
lowers = 'abcdefghijklmnopqrstuvwxyz'
s = str(input())
for i in range(len(s)):
    if s[i] in uppers:
        print(s[i].lower(), end='')
    elif s[i] in lowers:
        print(s[i].upper(), end='')
    else:
        print(s[i], end='')
print('')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
str = raw_input()
s = []
for c in str:
 s.append(c.lower() if c.isupper() else c.upper())
print ''.join(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
str = raw_input()
s = ""
for c in str:
 s += (c.lower() if c.isupper() else c.upper())
print s

Submission status: Accepted

Solution code:
S = input()
Slist = list(S)
big = ord('A')
small = ord('a')
diff = big-small
for i in range(len(Slist)):
    w = ord(Slist[i])
    if small <= w:
        #?°?????????????
        Slist[i] = chr(w+diff)
    elif big <= w:
        Slist[i] = chr(w-diff)
print(''.join(Slist))

Submission status: Accepted

Solution code:
str = input()
dst = ''
for char in str:
    if char.isupper():
        dst += char.lower()
    elif char.islower():
        dst += char.upper()
    else:
        dst += char
print(dst)

Submission status: Accepted

Solution code:
text = raw_input()

print text.swapcase()

Submission status: Accepted

Solution code:
for i in raw_input().split():
    print i.swapcase(),

Submission status: Accepted

Solution code:
line = input()
result = []
for c in line:
    num = ord(c)
    if num >= ord("A") and num <= ord("Z"):
        c1 = chr(ord("a") + num - ord("A"))
        result.append(c1)
    elif num >= ord("a") and num <= ord("z"):
        c1 = chr(ord("A") + num - ord("a"))
        result.append(c1)
    else:
        result.append(c)
print("".join(result))

Submission status: Accepted

Solution code:
def toggle(c):
    L = c.lower()
    if c == L:
        return c.upper()
    else:
        return L
print(''.join(map(toggle, input())))

Submission status: Accepted

Solution code:
print(''.join([c.upper() if c.islower() else c.lower() for c in input()]))

Submission status: Accepted

Solution code:
line = list(input())
for k,v in enumerate(line):
    line[k] = v.swapcase()
print(''.join(line))

Submission status: Accepted

Solution code:
before = input()
after = ''
for letter in before:
    if letter.isupper():
        after += letter.lower()
    elif letter.islower():
        after += letter.upper()
    else:
        after += letter
print(after)

Submission status: Accepted

Solution code:
print(raw_input().swapcase())

Submission status: Accepted

Solution code:
for c in input():
    if c.isupper():
        print(c.lower(), end='')
    elif c.islower():
        print(c.upper(), end='')
    else:
        print(c, end='')
print()

Submission status: Accepted

Solution code:
print("".join([_.upper() if _.islower() else _.lower() for _ in input()]))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_8_A

??§????????¨?°????????????\?????????

????????????????????????????°?????????¨??§???????????\????????????????????°????????????????????????????????????
"""

if __name__ == '__main__':
    # ???????????????????????\???
    raw_input = input()

    # ??§??????????°????????????\??????????????????
    print(raw_input.swapcase())

Submission status: Accepted

Solution code:
n=input()
m=''
for i in range(len(n)):
    c=str(n[i])
    if(n[i].islower()):
        c=n[i].upper()
    elif(n[i].isupper()):
        c=n[i].lower()
    m+=c
print(m)

Submission status: Accepted

Solution code:
value = input()
convert_value = []
for x in value:
    if x.isupper():
        convert_value.append(x.lower())
    elif x.islower():
        convert_value.append(x.upper())
    else:
        convert_value.append(x)
print(''.join(x for x in convert_value))

Submission status: Accepted

Solution code:
from itertools import starmap
print("".join(starmap(lambda c: c.lower() if 'A' <= c <= 'Z' else c.upper(), input())))

Submission status: Accepted

Solution code:
s=list(input())
for i in range(len(s)):
	if s[i].isalnum():
		if s[i].islower():
			s[i]=s[i].upper()
		elif s[i].isupper():
			s[i]=s[i].lower()
print("".join(s))