1. 문자열 후반 자르기 exp_str = "Hello bye" #bye만 자르고 싶으면? - 3개 exp_str_slice = exp_str[-3:] print(exp_str_slice) #bye가 나옴 즉, -를 붙이면 후반의 문자열을 자를 수 있음. 원하는 개수만큼 넣으면 됨 str[-n:] 2. 문자열 앞부분 만 자르고 싶을 때 exp_str = "Hello by" str_slice = exp_str[5:] print(str_slice) #Hello 가 나옴