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

1 stars 14 forks source link

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

Closed 54162476 closed 2 years ago

54162476 commented 2 years ago
def to_camel_case(underscore_str):

camelcase_str = ""
if '_' not in underscore_str:
    camelcase_str = underscore_str[0].lower() + underscore_str[1:]
elif only '_' in underscore_str:
    camelcase_str = underscore_str.replace('_','')
else :
    i = underscore_str.title().replace('_','')
    camelcase_str = i[0].lower() + i[1:]
return  camelcase_str

위 코드처럼 했더니 error가 나옵니다. 어느 부분이 잘못된건지 모르겠습니다.

blissray commented 2 years ago

이렇게 붙이기는 좀 어렵구요. 코드로 붙여주시겠어요? edit 기능을 쓰시면 됩니다.

54162476 commented 2 years ago

교수님 어떻게 편집하는지 잘 모르겠습니다.

blissray commented 2 years ago

오른쪽의 edit 버튼을 눌러서 수정하면 좋겠습니다.

image

54162476 commented 2 years ago

교수님 수정했습니다. 검토 부탁드립니다.