For different objects involved in a task, different types may be chosen for representation. Each type has a different range and ability of representation, and the efficiency to tackle problems is also different. Only with a definite data type can a program allocate definite space to the data to conduct accurate computing. If the type is unclear, the size of storage space may be random often leading to failure in direct computing. Let's first look at the common data types in Python. The standard data types in Python include integer, floating point, complex number, Boolean, string, list, tuple and dictionary. In this section, we'll first introduce integer, floating point, complex number, Boolean and string. And we'll talk about list, tuple and dictionary etc. in following chapters. Let's look at the integer type first. For standard integer type, its length is related to the machine word length. For example, for a standard integer type at a 32-bit machine, its range shall be between -2 to the power of 31 and 2 to the power of 31 minus 1(-2^31 ~ 2^31-1). What if it is a 64-bit machine? Its range should be between -2 to the power of 63 and 2 to the power of 63 minus 1(-2^63 ~ 2^63-1) The range of long type in Python is far larger than that in the C language or any other similar compiled language. In Python the long integer type is related to the size of memory supported by the machine, so it can easily express a very long integer. But actually after Python 2.2, the integer type and the long type have been unified, so the length supported by integer type is also related to the size of memory. And similarly it can express a very huge integer. We may generally say that, in Python, there is almost no error of overflow in integer type. If you have learned any other language, you might think overflow is a quite boring problem. So that is also a very lovely point of Python. The Boolean type is indeed a sub-class of integer. It only has two values True and False. Essentially True is stored as 1, while False is stored as 0. In Python, as for any number whose value is 0 or empty set, like an empty list or an empty tuple we'll talk about later, its Boolean value in Python is always False. In practice, you may assign True or False to a variable to express the meaning of true or false you want it to represent. We would then see that its actual value is 1 or 0. The floating point type is actually the real number in mathematics, like this value 3.22. Besides, a floating point number in Python, like in any other programming language, may be expressed in scientific notation. For example, as for this form of 9.8e3, its actual value is 9800.0. Let's guess what e3 represents. Should that be 10 to the power of 3? e-2 is surely 10 to the power of -2. So what's this value? It is -4.78 times 10 to the power of -2. So, as a result, we get this value. The floating point type is called float in Python . The complex number type is a very special type. It does not exist in many other programming languages. To use this type, a program is needed to generate it. In Python, this type is designed. A real number plus an imaginary number constitute a complex number. As for imaginary numbers, you know, they refer to numbers whose squares are negative numbers. In Python, an imaginary number is identified by the tag j, like 2.4+5.6j. It is such a complex number. Its type is "complex". Surely a complex may have no real part, like in this form. The imaginary part may also be 0. As for a complex number, its real part and its imaginary part can also be separated. The function used here is real() and imag(). For example, for a complex number, we may use imag() to acquire its imaginary part, i.e. the part of imaginary number, and use real() to acquire its real part, i.e. the part of real number. Besides, we may also use the function of conjugate() to acquire the conjugate complex number of a complex number. For instance, as for the conjugate complex number of x, we may use this function, and then acquire its conjugate complex number. In Python, there are also some basic sequence types: string, list and tuple. Of them, strings and tuples are immutable types, while lists are mutable ones. We'll talk about lists and tuples later. The list type is quite powerful, it is designated with square brackets. Tuples are quite similar to lists in use, they are designated with parentheses. Let's look at strings briefly, since they are quite common in practice. As for strings, in representation, we may delimit them with single quotes, double quotes or triple quotes. For example, we may write them into this form, or alternatively, into this or this form. It's worth mentioning that triple quotes do not contain one double quote mark plus one single quote, or one single quote plus one double quote mark, but three single quotes. We had an example earlier to show that triple quotes may indicate a string of multiple lines. Additionally, single quotes or double quotes can be freely used inside triple quotes. As for strings or lists or tuples, those basic sequence types can be very conveniently used in Python, with many delicate designs. For example, if I want to take this character "e" in practice. I may use an indexing operator. How? Like this The variable name is myString. The index of this position is 1, so I write like this to acquire the character "e". Besides, there are operators like "+", which may join two strings. In addition, strings, tuples and lists, have abundant functions available for use. You guys can try them first. Sure, you may also wait for my lecture about that and then have some practice. In Python, there is also a special type, called mapping type. The only mapping type in Python is dictionary. When used, the dictionary is delimited with braces. Its members are all groups of objects with corresponding keys and values. During using, we may see that it can be used in this way, "d" is its key, and we can get its value. Of course, applications of dictionary are far beyond this very simple acquisition of value through a key. We'll see its powerful functions later. What I talked about just now are some standard data types in Python. Some have been introduced here. Some will be introduced in later classes. You guys can find some small cases to do a little practice.