#python #anaconda #jupyter-notebook #visual-code #html #css #javascript #http 제목Step _ 07 실습에서 None 없애기2021-09-26 02:01작성자putkedef calcCharacterFromString(usersentence,userword) : if (usersentence.count(userword) > 0) : print(usersentence.count(userword)," words in sentence.") else : return "Error . There is no word in sentence." inputsentence = input("Enter the sentence that you want to test. ")inputword = input("Enter the word that you want to count. ")print(calcCharacterFromString(inputsentence,inputword))이렇게 출력했을때 문장안에 있는 단어로 이제 if구문의 조건에 맞게 값을 입력하면 2 words in sentenceNone 이런식으로 None이 떠요 제가 그래서 실험적으로 맨 아래에 있는 print 구문을 없애고 (calcCharacterFromString(inputsentence,inputword) 이것만 입력을 했는데 None이 안뜨더라고요 어떻게 해서 이런 상황이 발생한건지 모르겠어요 목록수정삭제답변글쓰기 댓글 [0] 댓글작성자(*)비밀번호(*)내용(*) 댓글 등록 더보기이전[re]함수 실행 관련 질문입니다수업도우미 이유제2021-09-27다음[re]Step _ 07 실습에서 None 없애기수업도우미 정수연2021-09-26 Powered by MangBoard | 워드프레스 쇼핑몰 망보드