강의

멘토링

커뮤니티

Inflearn Community Q&A

florice09229969's profile image
florice09229969

asked

[Renewal] Python Introduction and Web Crawling Basics Bootcamp [Python, Web, and Data Understanding Fundamentals] (Updated)

The most natural way to become familiar with Python basics through problem-solving: Loops and various data structure applications 2

52번 문제에 관한 질문

Written on

·

192

2

tupledata = ('fun-coding1', 'fun-coding2', 'fun-coding3', 'fun-coding4', 'fun-coding5')

print(tupledata[1:6])

('fun-coding2', 'fun-coding3', 'fun-coding4', 'fun-coding5')



튜플 그대로 실행해도 이렇게 실행값이 제대로 나옵니다.

근데 선생님께서 튜플은 리스트처럼 변환하거나 이런게 안된다고 하셨는데 이렇게 인덱스를 적용하는 것이 가능한가요?
python웹-크롤링

Answer 1

1

funcoding님의 프로필 이미지
funcoding
Instructor

안녕하세요. 

네 튜플 데이터를 수정하는 것은 안되지만, 인덱스를 통해, 특정 데이터를 가리키는 것은 지원합니다. (그러지 않으면, 튜플 안의 데이터를 선택할 수 없으니까요)

감사합니다.

florice09229969's profile image
florice09229969

asked

Ask a question