주 메뉴 열기

wwiki β

바뀜

Python

295 바이트 추가됨, 2019년 12월 8일 (일) 06:48
string
=== trim===
https://www.w3schools.com/python/ref_string_strip.asp
 
=== length ===
 
=== substring ===
문자열은 배열과 같으므로 다음과 같이 접근이 가능하다.
 
-는 negative index로 뒤에서 5번째에서 뒤에서 세번째까지의 문자열을 구할 수도 있다.<syntaxhighlight lang="python">
string[2:5]
 
string[-5:-3]
</syntaxhighlight>
 
==built in functions==
===len===
 
length
https://www.w3schools.com/python/ref_func_len.asp
편집
2,431