Notice
Recent Posts
Recent Comments
Link
250x250
목록error (1)
develope_kkyu
[오류 해결] TypeError: unsupported operand type(s) for &: ‘str’ and ‘str’
상황 셀렉트박스에서 각각 리그 선택과 지구 선택을 하면 그에 맞는 팀선택 셀렉트박스를 구현하고 싶었다. 오류 문구 TypeError: unsupported operand type(s) for &: ‘str’ and ‘str’ str 타입끼리의 & 연산자를 지원하지 않는다. 문제 코드 if league == '내셔널 리그' & region == '동부': ~~~~~~~~~^~~~~~~~ 해결 st.sidebar.write("팀 선택") league = st.sidebar.selectbox('리그 선택',('내셔널 리그', '아메리칸 리그')) if league == '내셔널 리그': region = st.sidebar.selectbox('지구 선택',('동부', '중부', '서부')) if region =..
Python
2023. 2. 19. 23:54