파이썬 튜토리얼

파이썬 홈 파이썬 소개 파이썬 시작하기 파이썬 구문 파이썬 주석 파이썬 변수 파이썬 데이터 유형 파이썬 숫자 파이썬 캐스팅 파이썬 문자열 파이썬 부울 파이썬 연산자 파이썬 목록 파이썬 튜플 파이썬 세트 파이썬 사전 파이썬 If...Else 파이썬 while 루프 Python For 루프 파이썬 함수 파이썬 람다 파이썬 배열 파이썬 클래스/객체 파이썬 상속 파이썬 반복자 파이썬 범위 파이썬 모듈 파이썬 날짜 파이썬 수학 파이썬 JSON 파이썬 정규식 파이썬 PIP 파이썬 시도...제외 파이썬 사용자 입력 파이썬 문자열 포맷

파일 처리

파이썬 파일 처리 파이썬 읽기 파일 Python 파일 작성/작성 파이썬 파일 삭제

파이썬 모듈

넘파이 튜토리얼 팬더 연습 사이피 튜토리얼

파이썬 Matplotlib

Matplotlib 소개 Matplotlib 시작하기 Matplotlib 파이플로트 Matplotlib 플로팅 Matplotlib 마커 Matplotlib 라인 Matplotlib 레이블 Matplotlib 그리드 Matplotlib 서브플롯 Matplotlib 분산 Matplotlib 바 Matplotlib 히스토그램 Matplotlib 파이 차트

기계 학습

시작하기 평균 중앙값 모드 표준 편차 백분위수 데이터 배포 정규 데이터 분포 산포도 선형 회귀 다항식 회귀 다중 회귀 규모 훈련/시험 의사결정나무

파이썬 MySQL

MySQL 시작하기 MySQL 데이터베이스 생성 MySQL 테이블 생성 MySQL 삽입 MySQL 선택 MySQL 어디 MySQL 주문 기준 MySQL 삭제 MySQL 삭제 테이블 MySQL 업데이트 MySQL 제한 MySQL 조인

파이썬 몽고DB

몽고DB 시작하기 MongoDB 데이터베이스 생성 MongoDB 컬렉션 생성 몽고DB 삽입 몽고DB 찾기 몽고DB 쿼리 몽고DB 정렬 몽고DB 삭제 MongoDB 드롭 컬렉션 몽고DB 업데이트 몽고DB 제한

파이썬 참조

파이썬 개요 파이썬 내장 함수 파이썬 문자열 메서드 파이썬 목록 메서드 파이썬 사전 메서드 파이썬 튜플 메서드 파이썬 세트 메소드 파이썬 파일 메서드 파이썬 키워드 파이썬 예외 파이썬 용어집

모듈 참조

랜덤 모듈 요청 모듈 통계 모듈 수학 모듈 cMath 모듈

파이썬 사용법

목록 중복 제거 문자열 반전 두 개의 숫자 더하기

파이썬 예제

파이썬 예제 파이썬 컴파일러 파이썬 연습 파이썬 퀴즈 파이썬 인증서

Python - 문자열 메서드


문자열 메서드

Python에는 문자열에 사용할 수 있는 내장 메서드 세트가 있습니다.

참고: 모든 문자열 메서드는 새 값을 반환합니다. 그들은 원래 문자열을 변경하지 않습니다.

Method Description
capitalize()Converts the first character to upper case
casefold()Converts string into lower case
center()Returns a centered string
count()Returns the number of times a specified value occurs in a string
encode()Returns an encoded version of the string
endswith()Returns true if the string ends with the specified value
expandtabs()Sets the tab size of the string
find()Searches the string for a specified value and returns the position of where it was found
format()Formats specified values in a string
format_map()Formats specified values in a string
index()Searches the string for a specified value and returns the position of where it was found
isalnum()Returns True if all characters in the string are alphanumeric
isalpha()Returns True if all characters in the string are in the alphabet
isdecimal()Returns True if all characters in the string are decimals
isdigit()Returns True if all characters in the string are digits
isidentifier()Returns True if the string is an identifier
islower()Returns True if all characters in the string are lower case
isnumeric()Returns True if all characters in the string are numeric
isprintable()Returns True if all characters in the string are printable
isspace()Returns True if all characters in the string are whitespaces
istitle() Returns True if the string follows the rules of a title
isupper()Returns True if all characters in the string are upper case
join()Joins the elements of an iterable to the end of the string
ljust()Returns a left justified version of the string
lower()Converts a string into lower case
lstrip()Returns a left trim version of the string
maketrans()Returns a translation table to be used in translations
partition()Returns a tuple where the string is parted into three parts
replace()Returns a string where a specified value is replaced with a specified value
rfind()Searches the string for a specified value and returns the last position of where it was found
rindex()Searches the string for a specified value and returns the last position of where it was found
rjust()Returns a right justified version of the string
rpartition()Returns a tuple where the string is parted into three parts
rsplit()Splits the string at the specified separator, and returns a list
rstrip()Returns a right trim version of the string
split()Splits the string at the specified separator, and returns a list
splitlines()Splits the string at line breaks and returns a list
startswith()Returns true if the string starts with the specified value
strip()Returns a trimmed version of the string
swapcase()Swaps cases, lower case becomes upper case and vice versa
title()Converts the first character of each word to upper case
translate()Returns a translated string
upper()Converts a string into upper case
zfill()Fills the string with a specified number of 0 values at the beginning