인프런 커뮤니티 질문&답변
index 함수 설명에서...
작성
·
184
3
12분 35초쯤에 index함수의 인자를 리스트의 index위치로 설명하셨는데 index함수는 리스트에서 인자와 같은 value를 갖는 첫번째 원소의 위치를 반환하는 함수 아닌가요?
답변 1
0
좋은사람
지식공유자
안녕하세요. 찬우님.
네 맞습니다.
참고로 3번 째 매개변수는 끝 인덱스 위치를 제한 할 수 있습니다.
영상 해당 내용 확인 하겠습니다.
Syntax
str.index(str, beg = 0 end = len(string))
Parameters
-
str − This specifies the string to be searched.
-
beg − This is the starting index, by default its 0.
-
end − This is the ending index, by default its equal to the length of the string.





