Closed 54162476 closed 2 years ago
elif only '_' in underscore_str:
이런 문법은 없습니다.
'_'만 있을 경우 코드를 어떤식으로 짜야하는지 모르겠습니다.
def to_camel_case(underscore_str):
camelcase_str = ""
if '_' not in underscore_str:
camelcase_str = underscore_str[0].lower() + underscore_str[1:]
elif '_' == underscore_str:
camelcase_str = underscore_str.replace('_','')
else:
i = underscore_str.title().replace('_','')
camelcase_str = i[0].lower() + i[1:]
return camelcase_str
교수님 '_' == underscore_str 이건 문자열에 _만 있다는 뜻이 아닌가요?
음 아니에요 여러개있을수있잖아요?
교수님 코드 작동이 잘 되지 않습니다. 어느 부분이 잘못된건지 모르겠습니다.