Python Basics (Self-learning notes)

Source: Internet
Author: User
If the word characters contains both ' and contains ', you can use the escape character \ to identify
\ n is a newline, \ t represents a tab, a \ \ \, you can use R "to indicate" the internal string is not escaped by default, when there are a lot of line breaks inside the string, the "" ... "format to wrap the same as \ n usage, easy to read.
Use True, False to indicate Boolean values (logical values, note capitalization)
The conditional selection operation (and or not) Boolean values are often used in judgments (note indentation ...). Text representation without indentation)
For example:
If age >= 18:
Print (' adult ')
Else
Print (' teenager ')
Note Data type conversions:
Int ()--integral type
Float ()--turn floating point type
STR ()--to the character type

Python Basics (Self-learning notes)

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.