Skip to content · ⁨본문 바로가기⁩

The first three letters · ⁨처음 세 문자⁩

English

The first three letters

word is "python". Store its first three characters in part using a slice.

⚠️ A slice stops before its second number. word[:3] gives three characters — positions 0, 1, 2 — and never position 3. So the number you write is the COUNT you want, not the last position.

한국어

첫 세 문자

word는 "python"입니다. 슬라이스(slice)를 사용하여 첫 세 문자를 part에 저장합니다.

⚠️ 슬라이스는 두 번째 숫자 전에 멈춥니다. word[:3]는 세 개의 문자(위치 0, 1, 2)를 제공하며, 위치 3는 포함하지 않습니다. 따라서 작성하는 숫자는 마지막 위치가 아니라 원하는 개수입니다.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP