Python learning notes-day3-python keywords, python-day3-python

Source: Internet
Author: User
Tags print format

Python learning notes-day3-python keywords, python-day3-python

1. and logic and

2. assert checks whether a condition is true. If it is false, an error is thrown.

3. The break jumps out of the for and while loop.

4. class definition

5. continue jumps out of this loop and executes the next loop.

6. def Defined Functions

7. del: Delete the data at the specified position in the data.

8. Supporting use of elif and if (meaning otherwise)

9. Supporting use of else and if (representing other results except if And elis)

10. catch exceptions with try

11. exec execute the Python statement stored in a string or file

12. finally code to be executed, whether or not there are exceptions to be processed

13. for Loop

14. classes in the from import module

From fromModule import dispName
DispName ()

From Main module improt class

15. global declaration of global variables

16. if Condition Statement

17. import Module

18. in determines whether the specified value is in the iterator

19. is checks whether two objects are the same object, not the same content

20. lambda defines anonymous Functions

21. not logical non-

22. or logic or

23. pass null statement, equivalent to {} in other languages {}

24. print format output

25. raise throws exceptions

26. return returns the value from the function and terminates the function operation.

27. try to catch exceptions and use them with the try.

28. while Loop

29. yield function return generator using the yield keyword

I did not understand the information about yield I found on the Internet. I will forget it for now.

 

 

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.