Start with python and start with python

Source: Internet
Author: User

Start with python and start with python

1. tranceback is a record

2. print (name. title () uppercase letters

Print (name. upper () Capital

Print (name. lower () lower case

Print ("Hello," + full_name.title () + "! ") Splicing

Print ("language: \ n \ tPython \ n \ tC \ n \ tJavaScripht") line breaks, tabs

Favorite_language.rstrip () removes white space

3. Technically, print in Python 3 is a function, so brackets are indispensable.

4. python calls a number with a decimal point as a floating point number.

5. message = "Happy" + str (age) + "rd Birthday! "Str () function to avoid type errors

6. When calculating the integer result, the method is not rounding, but directly deleting the fractional part. To avoid this situation, make sure that at least one operand is a floating point number.

7. the Programming Language perl once dominated the Internet field for a long time. Most early interactive websites used Perl scripts. This flexibility was acceptable during project development, however, we finally realized that too much emphasis on flexibility will make it difficult to maintain large projects.

8. Do not try to write perfect code. Write effective code first.

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: 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.