인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

유원상's profile image
유원상

asked

Introduction to Python for Programming and Data Science

-How to submit assignments

main함수오류

Written on

·

207

0

join과 특정 문자를 이용해 encoding_sentence를 띄어쓰기를 고려해서 메인 함수를 검토하기위해서 -----을 돌렸는데 아래와 같은 값이 나왔습니다. join할때 str를 문자로 바꾸어야된다는 말 같은데... 해결책이 있을까요?

"""

TypeError Traceback (most recent call last)

in

23

24 if __name__ == "__main__":

---> 25 main()

in main()

12 print(decoding_sentence(user_input))

13 elif is_validated_english_sentence(user_input):

---> 14 print(encoding_sentence(user_input))

15 elif user_input is "0":

16 print("Good Bye")

in encoding_sentence(english_sentence)

29 result.append("T")

30

---> 31 result = ' '.join(result)

32 result = result.replace("T","").strip()

33

TypeError: sequence item 0: expected str instance, NoneType found

"""

pythonbigdata

Answer 1

0

TeamLab님의 프로필 이미지
TeamLab
Instructor

str 함수중에는 sort .와 같이 return이 없는 함수가 있습니다. 그런 함수를 쓰고 그 값을 할당한다면 발생가는 한 에러입니다.

유원상's profile image
유원상

asked

Ask a question