Skip to content

Instantly share code, notes, and snippets.

@YOUNGJUN2
Created July 3, 2019 06:18
Show Gist options
  • Save YOUNGJUN2/efc60799bfbe7da4f6903ee24ce720a7 to your computer and use it in GitHub Desktop.
Save YOUNGJUN2/efc60799bfbe7da4f6903ee24ce720a7 to your computer and use it in GitHub Desktop.
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