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
- 배열
- 문자열
- 오블완
- Object Oriented Programming
- Python
- Class
- assignment operator
- 파이썬
- function
- 포인터
- Pre-processing
- raw data
- pointer
- OOP
- predictive analysis
- C++
- array
- baekjoon
- Deep Learning
- pass by reference
- 반복문
- string
- 백준
- const
- 함수
- 티스토리챌린지
- Data Science
- programming
- 알고리즘
- vscode
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 |