Python Learning DAY1 (still)

Source: Internet
Author: User

S3 Strings and O console utput

1 Python There is also a good data type is string

21 string is a string that is wrapped by ' or '

3 Python is implemented by \ To implement the escape character

4 We can use "" to avoid the appearance of escape characters

Exercise: Set the variable letter to the fifth character of Monty

5 The first usage of strings, Len () to find the string length

6 The second method of string, lower () converts all uppercase letters of a string into lowercase letters

7 The third method of string, upper () converts all lowercase letters of a string into uppercase letters

8 string Fourth method, str () converts a non-string to a string, such as STR (2) is to convert 2 to the string "2"

More than 9 of the methods can be written in addition to Len (). Fun () and fun (string)

10 formatting of the string, formatted with%, the string is%s

Python Learning DAY1 (still)

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: info-contact@alibabacloud.com 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.