We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e14a4eb commit f6728deCopy full SHA for f6728de
swapcase.py
@@ -0,0 +1,16 @@
1
+"""
2
+ (c) Sergio Morales 2013
3
+ CodeEval Challenge: Swap Case
4
+ Date Solved: 12/09/13
5
6
+
7
+import sys
8
+test_cases = open(sys.argv[1], 'r')
9
+for test in test_cases:
10
+ for i in range(0, len(test)):
11
+ if (test[i] >= 'A' and test[i] <= 'Z'):
12
+ print( test[i].lower(), end="")
13
+ else:
14
+ print( test[i].upper(), end="")
15
+ print('\n', end="")
16
+test_cases.close()
0 commit comments