After Index
You can return a portion of a string from some index onwards by using the bracket operator and and the expression index:. For example: if color = 'blue' then color[1:] = 'lue' since the result is all of the characters in color from the index onwards. Create a function called after_index() that accepts a string and a number n as parameters and returns a string consisting of the characters from the index to the end of the string.
Results | ||||||||||||||||
|
'Python > 왕초보를 위한 파이썬' 카테고리의 다른 글
Python 문자열 (0) | 2012.04.10 |
---|---|
Python 실습_Replace at Index (0) | 2012.04.10 |
Python 실습_Character Replacement (0) | 2012.04.10 |
Python 실습_Alphabet count (0) | 2012.04.10 |
Python 실습_Capitalize Even Items (0) | 2012.04.10 |
댓글