TEAMLAB-Lecture / python-101-for-data-science-by-pknu

1 stars 14 forks source link

text_processing2 두번째 문제 관련 질문 #9

Closed chaechaek1m closed 2 years ago

chaechaek1m commented 2 years ago

제출 전 print(to_camel_case(underscore_str1))로 확인해봤을 때는 예시 3개 모두 맞게 나오는데 코드번에 제출하면 통과가 되지 않습니다. 무엇을 잘못 작성하였는지 모르겠습니다.

camelcase_str = ""

    if " " and "_" not in underscore_str:
        camelcase_str = underscore_str
    else:
        titleCase =  underscore_str.title().replace("_", "")
        camelcase_str = titleCase[0].lower() + titleCase[1:]

    return camelcase_str 
blissray commented 2 years ago

음 일단 붙이실때는 함수의 제일 윗 부분까지 같이 붙여 보시면 어떨까요?

chaechaek1m commented 2 years ago

넵! 계속 시도해서 해결했습니다. 답변 감사합니다!