current position:Home>PYthon - string type and function, slicing function, converting the numerical method, the built-in string string functions

PYthon - string type and function, slicing function, converting the numerical method, the built-in string string functions

2022-11-08 07:19:35will be open today

String type

String Slicing Operations:

    A range of positions can be determined by two index values, and a string of this range is returned

Format: String variable name [Start position: End position: Step length]

The start position and end position are integer values, and the subsequence index starts from the start position and ends at the end position of the index, but does not include the end position

Built-in string methods:

  Note:

    str.isnumeric() can determine whether a string is a pure number

     str.replace (characters to be replaced, content to be replaced)

stu.split('split symbol') string split function

copyright notice
author[will be open today],Please bring the original link to reprint, thank you.
https://en.pythonmana.com/2022/312/202211080628357878.html

Random recommended