slicing (1) 썸네일형 리스트형 [파이썬] Slicing (자르기) * string 자리 숫자 print(student_name[4]) == print(student_name[-1] * Slicing ( 자르기) 예를 들어보자면, abc="abcdefg" abc[:]returns the entire string 전체를 다 보여준다 abcdefg abc[::2]returns the first char and then steps to every other char in the string 전체에서 첫번째 글자, 그리고 한칸씩 띄워서 글씨를 보여준다 aceg abc[1::3]returns the second char and then steps to every third char in the string [1: ] 중에서 첫번째 글짜 즉 b, 그리고 3칸뒤인 e가 보여진다. b.. 이전 1 다음