Operating string data (c)

Whether ### endswith () determines the end of the suffix string specified

- Syntax: ** str.endswith (suffix, Start, End) **
- used to determine whether a string ends with the specified suffix returns True if the end with the specified suffix, otherwise it returns False. (Boolean operation)
- optional parameter "start" and "end" for the start and end position of the search string. (Default is the entire length of the string)
Start parameter to 0 is the first character index value.
end parameter in a character 1 as the first index value, i.e. the total length required +1.
- suffix for the need to find value (suffix) at the end of

 

### expandtabs () for the tab character string ( '\ t') into a space
- Syntax: ** str.expandtabs (= TabSize. 8) **
- for the tab character string ( '\ t') into a space
- the default is 8 tabsize spaces, i.e., if the parameter is not written, the program automatically add eight spaces
- the number of spaces that can be customized parameter, 4, 12, casual

Guess you like

Origin www.cnblogs.com/yourpython/p/11116845.html