D4 string and sequence

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/Lyh199611/article/details/102729012

String Review: Here Insert Picture Description
But is not the real meaning of the modifications. The old string is still
required to cover

2. rewrite:

  1. Capitalized capitalize ()

Here Insert Picture Description
2. The entire string to lowercase: casefold ()
Here Insert Picture Description
3. play the string, and padded with spaces to the width of the new string length Center (width)
the minimum width is 20, about the three grid. Each plus (10), plus the left and right of each space 5.
Here Insert Picture Description
4. Return the number of sub appear in the string, start and end parameters indicates a range, optional. COUNT (sub [, Start [, End]])
Here Insert Picture Description
5. The string is checked whether the sub substring end, a return True, otherwise return False. parameter indicates the start and end range, optional. endsWith (Sub [, Start [, End]]) Here Insert Picture Description
6. The tab character in the string (\ t) are converted to spaces, if not specified, the default is the number of spaces. 8 = TabSize.
expandtabs ([TabSize =. 8] )
Here Insert Picture Description
7. The
Here Insert Picture Description
Find (Sub [, Start [, End]])
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/Lyh199611/article/details/102729012