Python! Surprising python

Source: Internet
Author: User
Today, I saw the Test-Driven Development in Python article, which mentioned that the unittest Module was provided in version 2.1, and pyUnit is similar to xUnit tools such as JUnit, it's amazing.

When I looked at the source code of the python class library, many modules had the Test class. At that time, I thought python had accepted the Test driver. I didn't expect python to go faster.

In addition, a small python tip exchanges the values of two variables, and does not use the third variable:

>>> A, B = 1, 2

>>> A, B = B,

>>> A, B

(2, 1)

>>>

It's that simple. python is fascinating to me.

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.