python string related operations

1. '\ N' newline
Here Insert Picture Description
2. '\ T' is a tab
Here Insert Picture Description
3. The string concatenation, directly by "+" to complete the
Here Insert Picture Description
repeated string 4, "*" is implemented
Here Insert Picture Description
5. string extracting sections
Here Insert Picture Description
6. string commonly used functions
len () function to get the length of the string
Here Insert Picture Description
split () function, split the string, by default, to divide the space

Here Insert Picture Description
Here Insert Picture Description
strip () remove extra spaces before and after the string
Here Insert Picture Description
Here Insert Picture Description
upper () function, the string of capitalized letters
lower () function, the lowercase letter string
title () function, each of the string capitalized word
capitalize () function, the first letter string
Here Insert Picture Description
Here Insert Picture Description
replace ( 'a', 'b ') function, the string is replaced with a B
Here Insert Picture Description
cOUNT () function, count
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/weixin_38324954/article/details/90698218