Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- 알고리즘
- 티스토리챌린지
- array
- 파이썬
- programming
- 문자열
- raw data
- const
- pass by reference
- 백준
- function
- Python
- C++
- vscode
- 오블완
- 배열
- Data Science
- Pre-processing
- 함수
- 반복문
- Deep Learning
- 포인터
- baekjoon
- pointer
- Class
- predictive analysis
- Object Oriented Programming
- string
- OOP
- assignment operator
Archives
- Today
- Total
Channi Studies
Analyzing String | 문자열 함수들 본문
There are some ways in Python to analyze string.
- substring in s
Returns True if the string s contains substring and False otherwise.
if "-" is not in name:
...
- s.count(substring)
Returns the number of non-overlapping occurrences of substring in s.
- s.endswith(substring)
Returns True if the string s ends with the substring and False otherwise.
- s.startswith(substring)
Returns True if the string s starts with the substring and False otherwise.
- s.find(substring)
Returns the lowest index in the string s where substring begins, or –1 if substring is not found.

'python' 카테고리의 다른 글
| List 리스트 (0) | 2025.01.26 |
|---|---|
| Terminating a Program (프로그램 종료) (0) | 2025.01.12 |
| [baekjoon] 2563번 색종이 Python (0) | 2023.10.14 |
| [baekjoon] 10789번 세로읽기 Python (1) | 2023.10.14 |
| [programmers] 문자열 여러번 뒤집기 (python) (8) | 2023.10.11 |