index() 메서드는 지정된 값의 첫 번째 항목을 찾습니다.
index() 메서드는 값을 찾을 수 없는 경우 예외를 발생시킵니다.
thistuple = (1, 3, 7, 8, 7, 5, 4, 6, 8, 5) x = thistuple.index(8) print(x)
결과
3
12 python에서 에러가 발생한 후에도 코드 실행을 계속할 수 있는 방법
15 에러가 있는데 Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings'
14 파이썬에서 파일 다운로드 하는 방법
11 Python에서 exception이 생긴 라인 숫자값을 어떻게 구할 수 있나요?
14 Pytube 쓸 때 pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple 에러 해결방법
© 2022 pinfo. All rights reserved.