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

The last letter · ⁨마지막 문자⁩

English

The last letter

word is "python". Store its last character in last, without counting the letters yourself.

A negative position counts from the end: word[-1] is the last character, word[-2] the one before it. It works whatever the length.

한국어

마지막 문자

word는 "python"입니다. 글자를 직접 세지 않고 마지막 문자를 last에 저장합니다.

음의 위치는 끝에서 세는 것입니다: word[-1]는 마지막 문자, word[-2]은 그 앞의 문자입니다. 길이가 어떻게 되든 이 방식은 작동합니다.

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

IGCSE, A-Level & AP