Python built-in data operations (1) --- string str, pythonstr
S. capitalize ()-> str Return a capitalized version of S, I. e. make the first character have upper case and the rest lower case.Returns an upper-case string that converts the first
This article mainly introduces how to use str (string) in python3, which is very detailed. operations on various str strings in python3 are included in this article, if you want to learn more, let's take a look. This article mainly introduces how to
def capitalize (self):str = ' age 'Print (Str.capitalize ())Result: AgeConclusion: The first letter is capitalized, the other letters are lowercasedef casefold (self):str = ' Age-age 'Print (Str.casefold ())Results: Age-ageConclusion: The first
str_replace -substring substitution [str_replace]Mixed Str_replace (mixed $search, mixed $replace, mixed $subject [, int & $count])php function str_replace: Returns a string or array. The string or array is the result of replacing all search in
Replace, concat, and cast character string functions in mysql need to export a personal information of job-seeking users. This information requires three-table joint query requirements: birthdate format: 1990.01.02 Database: Gender display: men and
[Python Basics] str string, pythonstr string
The str string is an unchangeable object.1. Create a string
S1 = str () # create an empty string s2 = str ("hello") # create a string "hello"
2. Common functions and operations for processing strings (1).
A very high frequency data type "str string" is used in programming, and the string belongs to an immutable sequence.It is possible to declare a string in Python using ' single quotation marks ' or ' double quotation marks '.A string that matches
Usage tutorial of str (string) in python3, python3str
This article mainly describes how to use str (string) in python3. This article describes the operations in detail. Let's take a look at them.
_ Add _ function (append a string to the end)
S1 =
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.