Created
July 3, 2019 06:18
-
-
Save YOUNGJUN2/efc60799bfbe7da4f6903ee24ce720a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(s): | |
up = '' | |
j = 0 | |
for i in range(len(s)): | |
if s[i] == ' ': | |
up += ' ' | |
j = 0 | |
continue | |
elif j % 2 == 0: | |
up += s[i].upper() | |
elif j % 2 == 1: | |
up += s[i].lower() | |
j += 1 | |
return up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment