Python's most important data types

Source: Internet
Author: User


1 Write Parent Capital capitalize


Returns the meaning of centering the result by specifying a width

The default is to fill with spaces


Returns the number of occurrences of a string


Checks if a string is not starting with anything, it is true instead of false


To convert a tab in a string to a space the default is 8 bits


Detects if x is contained in a string if beg and end specify a range

If the detection is included in the specified range, if there is a return is, the reverse is-1 no error


Method is the same as find, just if there is no error


Returns True if the string has at least one character and a character letter or number, otherwise false

9-isalpha Ibid.

10-isdigit Ibid.


Specifies a string as a delimiter, merged into a new character

12-len return string length


Change uppercase in a string to lowercase

14-lstrip Remove the left space or the specified character


Replace string

16-rstrip \ Delete The end of the space to the right

17-swapcase uppercase to lowercase, lowercase to uppercase

Python's most important data types

Related Article

Contact Us

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: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.