0. The "#" notation indicates that the three quotation marks (either single or double) can also represent comments, and can annotate multiple lines and print multiple lines.
1. The variable name is best used in English that can accurately express its meaning so that others can understand it, avoid using Chinese or single letter.
2. With input whatever you enter, the default is a string type, and if you want to enter an integer you must add an int. You can also enter and then use the built-in function eval to convert. 3. The "/" Backslash is an escape character, and the characters n is escaped to indicate a newline, avoiding the need to escape the character by adding R at the beginning. 4. The "%" percent operator can be used for the remainder of integers or real numbers, or for string formatting, with the same effect as format. 5. The object in the import module takes precedence: from+ module name +import+ object name. The import+ module name is used only if multiple objects in the module are used more than once. This helps increase the speed of your code. 6. It is best not to insert or delete in the middle of the list, to select at the tail, so as not to change the subscript of some elements in the list. 7. Keys in a dictionary can only be immutable data, such as integers, real numbers, complex numbers, strings, tuples, and so on, and cannot be duplicated. A list, collection, dictionary, or other mutable type cannot be a key in a dictionary. 8. The collection can only contain immutable data types, such as numbers, strings, tuples, and so on, and cannot be duplicated, and cannot contain mutable types of data such as lists, dictionaries, collections, and so on, as in dictionary keys. 9. If you need to use the keyword in, you can use the collection or dictionary, do not use the list, because the use of the list is the slowest.
Python Learning Note 0