import sys
test_cases = open(sys.argv[1], 'r')
for test in test_cases:
arr=test.split()
string=""
for i in range(len(arr[0])):
if(int(arr[1][i])==0):
string+=str(arr[0][i])
else:
string+=str(arr[0][i]).swapcase()
print string
test_cases.close()
test_cases = open(sys.argv[1], 'r')
for test in test_cases:
arr=test.split()
string=""
for i in range(len(arr[0])):
if(int(arr[1][i])==0):
string+=str(arr[0][i])
else:
string+=str(arr[0][i]).swapcase()
print string
test_cases.close()
No comments:
Post a Comment